LOG IN SIGN UP
Documentation

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

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 199.27.79.249 and 23.235.47.249.

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

;; 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   208.78.70.4
ns2.p04.dynect.net. 12415   IN  A   204.13.250.4
ns3.p04.dynect.net. 12415   IN  A   208.78.71.4
ns4.p04.dynect.net. 12415   IN  A   204.13.251.4

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

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 199.27.79.249 you would add this entry to the file:

199.27.79.249 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 199.27.79.249.

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