Testing your site on Section before go-live Follow
Once your site has been setup in Section you may wish to conduct some testing before directing real world traffic through our platform.
You can achieve this by changing how DNS to the site is resolved on your local test machine.
- Obtaining a test IP.
For our managed customers, our engineers will provide you with a test IP and you can skip to part 2.
For self serve customers, to find out the IP address of the Section platform for your site, run the following command from a command prompt
nslookup <site domain>.c.section.io
For www.example.com that would be, nslookup www.example.com.c.section.io
This will give you one or more IP addresses. e.g. 203.0.113.1
- Open the test machine's 'hosts' file in a text editor. This will need to be done as an administrator or with root privilege.
MacOS and Linux: /etc/hosts
- Add a DNS entry into the file that will tell your test machine to send requests for that domain to the section.io platform instead of performing a DNS lookup.
For the example from point 1) and 2) this would look like:
Then save the file.
- Now open a new browser tab or window and navigate to the site with dev tools open.
Requests served from the section will always have a section-io-id response header.
If this header isn't present, check that the HOST file is correctly edited and saved. You may also need to flush the DNS cache of the browser. For Chrome enter the following in the address bar: chrome://net-internals/#dns then clear the host cache.
If you still do not see a section-io-id, contact our support team through which ever channel is available to your support plan.
We recommend focusing on functional testing of the site, such as user login, add to cart, checkout etc.
Performance testing when the site is not live on our platform can yield varying results due to the cache being cold from lack of real world traffic. Remember that the busier a site is, the better it should perform as the cache will be better populated.