wauterw
By:
wauterw

Multiple domainnames on nginx

February 15, 2015 1.7k views

I have setup Nginx with multiple blocks as described in the following tutorial https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-14-04-lts.

I configured 3 blocks, corresponding to 3 domains (e.g. a.com, b.com and c.com). I have a domainname at Namecheap (a.com) and two at Bluehost (b.com and c.com). I have changed all of the nameservers at the Namecheap/Bluehost to point to ns1.digitalocean.com. Then at DigitalOcean, I have created a domain for each one at DigitalOcean,

This setup however does not work as when I go to the site www.a.com, I still get my old website (which was hosted at the webhosting company). As I know propagation takes a while, I have waited about 6 hours now, but still no success. Am I missing some steps here?

One thing I was hesitating though was the IP address in the DigitalOcean "add domain" UI. I configured it to be the IP of the droplet the blocks are running on. As one also needs to select the droplet, DigitalOcean could know the IPaddress, so why to provide an IP address?

1 comment
  • Since you are still seeing your old site we can conclude that the DNS request is either:

    a.) Still being routed to your old DNS servers indicating that the nameserver change with your registrar is not yet live

    or

    b.) The change has been completed but either your DNS server or your local computer has cached DNS records with the old address.

    In both cases as long as you have pointed the domain to the ns1/3.digitalocean.com addresses it should just be a matter of waiting on this change to propagate. Since the DigitalOcean nameservers never had the IP of your old website, if it is still displaying then the DO nameservers are not yet being queried with requests for the domain.

1 Answer

This question was answered by @ryanpq:

Since you are still seeing your old site we can conclude that the DNS request is either:

a.) Still being routed to your old DNS servers indicating that the nameserver change with your registrar is not yet live

or

b.) The change has been completed but either your DNS server or your local computer has cached DNS records with the old address.

In both cases as long as you have pointed the domain to the ns1/3.digitalocean.com addresses it should just be a matter of waiting on this change to propagate. Since the DigitalOcean nameservers never had the IP of your old website, if it is still displaying then the DO nameservers are not yet being queried with requests for the domain.

View the original comment

Have another answer? Share your knowledge.