Fastly config, SSL certificates, 301 redirects, static asset performance — problems in these areas may block the launch of your shiny new store on Magento Commerce (Cloud).
In this article, Magento Launch Managers and Support Engineers share their real-life experience of preventing those issues.
Fastly (caching and content delivery)
- Fastly not set up or configured for your store on the Production environment
- your site hasn't been tested on Staging and Production with Fastly enabled and configured
Recommendation: set up Fastly and test it on both Staging and Production
Fastly is a Varnish-based Content Delivery Network (CDN) for serving static assets. It is required for Magento Commerce (Cloud) on Production environments, so it's important to configure Fastly and test your website (UAT) with Fastly enabled and configured — on both Staging and Production environments.
With Full Page Cache (FPC) enabled, your website performs differently; make sure you test it before going live.
The process of Fastly configuration is documented with many details in the Set up Fastly topic on DevDocs. Below are the important steps.
1. Install Fastly in an Integration branch and deploy
Fastly is not available in the Integration environment although it is used in Staging and Production. So, to test your Magento site with Fastly enabled, you need to:
- Install the Fastly module on your local environment (do not configure it)
- Push the code to Integration
- Deploy across to your Staging and Production environments
2. Enable and configure Fastly using the Magento Admin
See also: Get your Fastly credentials.
3. Upload Fastly VCL snippets
You can also create and add own custom VCL snippets.
4. Configure DNS for Fastly
Read the detailed articles:
Related Fastly articles on DevDocs
- Fastly Overview
- Fastly Setup for Magento Cloud
- Custom Fastly Varnish Configuration Language (VCL) snippets
- Fastly caching troubleshooting
- Fastly purge troubleshooting
SSL (TLS) certificate
Problem: without a valid and working SSL certificate, you cannot test external payment methods on the Checkout page — on the Staging environment.
Recommendation: request your shared SSL certificate for Staging or Live domain names.
Read about SSL certificates:
301 redirects from your previous store
Problem: 301 redirects are not provided or poorly configured, causing your store drop in SEO rankings and search listings.
Recommendation: carefully configure and test the 301 redirects.
In case you're migrating from an old website to a new one, the 301 redirects lead your Customers from the previously indexed old pages to the proper pages on your new store, like this:
http://www.mywebsite.com/old-category-page.html -> http://www.mywebsite.com/new-seo-friendly-category-page.html
- Redirects through routes.yaml on DevDocs
- Redirects through the Project Web Interface on DevDocs
- URL Rewrites on Magento User Guide
Problem: Static assets are served slowly so your site has poor performance (long load time, multimedia content not displayed, etc).
Recommendation: Provide performance testing and optimization.
Static assets of your website are CSS resources, images, videos, attached documents and much more. The way they are organized and served is a key factor in the performance of your site.
We advise using the Magento Performance Toolkit for performance testing. You could also consider these 3rd party tools:
- Siege: HTTP load-testing and benchmarking utility; supports basic authentication, cookies, HTTP, HTTPS and FTP protocols.
- Jmeter: A reputable load-testing and performance measuring tool. Helps gauge performance for spiked traffic, e.g., for flash sales.
- New Relic (provided): Locates processes and areas of the site causing slow performance with tracked time spent per action, like transmitting data, queries, Redis, etc.
- Blackfire (provided): Tracks through the issues New Relic finds and helps to dig deeper into specifics. Blackfire profiles the environment and helps locate bottlenecks in-depth: process, method call, query, load, etc.
- WebPageTest (free) and Pingdom (paid): Real-time analysis of your site pages load time with different origin locations.
- Test deployment on DevDocs