Testing setup before changing domains
After you deploy your service, but before you change your DNS entries to send your domain to our servers, you can check to see how your service is pulled through our network. Testing your domain can help you identify DNS issues or problems with your Fastly configuration.
To test your domain on Fastly before you make a final CNAME change you would:
- find out the IP address of a Fastly pop
- add a domain host entry to your hosts file
- test the domain in browser
Determine the IP address of a Fastly POP
Run nslookup or a dig command to determine the IP address of a Fastly POP. For example, nslookup on
global.prod.fastly.net would return:
$ nslookup global.prod.fastly.net Server: 10.100.8.11 Address: 10.100.8.11#53 Non-authoritative answer: global.prod.fastly.net canonical name = global-ssl.fastly.net. global-ssl.fastly.net canonical name = fallback.global-ssl.fastly.net. Name: fallback.global-ssl.fastly.net Address: 18.104.22.168 Name: fallback.global-ssl.fastly.net Address: 22.214.171.124
Find one of the final IP addresses returned at the bottom of the nslookup response. In this example, the ones you're looking for are
Alternatively, running a dig command for
global.prod.fastly.net would return this:
$ dig global.prod.fastly.net ; <<>> DiG 9.10.3-P3 <<>> global.prod.fastly.net ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 658 ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 4, ADDITIONAL: 5 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;global.prod.fastly.net. IN A ;; ANSWER SECTION: global.prod.fastly.net. 9 IN CNAME global-ssl.fastly.net. global-ssl.fastly.net. 9 IN CNAME fallback.global-ssl.fastly.net. fallback.global-ssl.fastly.net. 9 IN A 126.96.36.199 fallback.global-ssl.fastly.net. 9 IN A 188.8.131.52 ;; AUTHORITY SECTION: fastly.net. 12462 IN NS ns3.p04.dynect.net. fastly.net. 12462 IN NS ns4.p04.dynect.net. fastly.net. 12462 IN NS ns2.p04.dynect.net. fastly.net. 12462 IN NS ns1.p04.dynect.net. ;; ADDITIONAL SECTION: ns1.p04.dynect.net. 12415 IN A 184.108.40.206 ns2.p04.dynect.net. 12415 IN A 220.127.116.11 ns3.p04.dynect.net. 12415 IN A 18.104.22.168 ns4.p04.dynect.net. 12415 IN A 22.214.171.124
The final IP addresses (A records) are the last two items in the
ANSWER SECTION of the dig results:
Modify your hosts file
Temporarily add a static IP and domain host entry to your hosts file on your computer. For example if the domain you are testing is
www.example.com and one of the IP addresses returned by nslookup or a dig command is
126.96.36.199 you would add this entry to the file:
and save the changes.
/etc/hosts. On Windows-based machines, it's
Test your domain
Test your domain to see how Fastly pulls it through our network by restarting your browser if it's already running, and then typing your domain in the address field. You should now see the updated domain in the address field indicating requests are being sent to the Fastly POP.
Alternatively, you can test the domain using a ping command to verify that your domain is being served by a Fastly POP address. In this case,
ping www.example.com would display the Fastly POP address
Be sure to remove the host entry from your hosts file after you make CNAME changes to point your domain to Fastly.
Back to Top