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:

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

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
Name:   fallback.global-ssl.fastly.net

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 and

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

; EDNS: version: 0, flags:; udp: 4096
;global.prod.fastly.net.        IN  A

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
fallback.global-ssl.fastly.net. 9 IN    A

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.

ns1.p04.dynect.net. 12415   IN  A
ns2.p04.dynect.net. 12415   IN  A
ns3.p04.dynect.net. 12415   IN  A
ns4.p04.dynect.net. 12415   IN  A

The final IP addresses (A records) are the last two items in the ANSWER SECTION of the dig results: and

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 you would add this entry to the file: www.example.com

and save the changes.

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