How do I edit my current so I can add a 'cname'

September 1, 2014 2.7k views

I can see no way of doing this without recreating the domain record. Anybody know?

2 comments
  • I am not sure what is the problem, what nameserver are you using or domain registry. E.g. GoDaddy, CloudFlare.


    If you want to edit usually they won't let you edit you have to remove and add it again.

  • I forgot to add a cname, to include the www. prefix. How can edit and fixit?

2 Answers

I can get my WP site to resolve using an IP address and a domain name (less WWW). But when I prepend with the subdomain WWW it can't find anything. Someone else pointed out that I should have my droplet name = domain name. And I also read that the reason why WWW has this effect is the CNAME record has not been set. I've now remedied all these issues but still no joy.

I ran
$ dig -x myipaddress
and it is still pointing at my old (incorrect?) host name. How long do these things take to update?

Maybe when this updates it will all work.

The dig command with the -x option gets the reverse DNS record. You do not have to worry about this.

Go to the DNS section of the DigitalOcean control panel and click Add Record. Add the following CNAME record.

CNAME record

Replace yourdomain.com with your domain name.

  • I've already done this thanks (now works), did note also in the help files it mentioned this. So either I missed it or didn't understand what I was doing. Probably a bit of both.

    Its important I try and understand this stuff so when you say not to worry about it that actually doesn't help me to understand what's going on.

    When I did a DNS reverse lookup today ...
    $ dig -x MyDropletsIP +short

    I'm still getting the previous domain info I had set. I changed this 20 hours ago. Why would this be?

  • You should rename your droplet to change the reverse record. Click on your droplet, chose settings, go to the rename tab and enter the new domain name. Click Rename.

    Rename Droplet

    If you have already done this try querying DO's nameservers directly.

     dig -x MyDropletsIP +short +norec @ns1.digitalocean.com
    
  • I had already change my hostname to match my domain and amended the cname, yesterday.

    $ dig -x dropletIP

    command is only now, 24 hours later, showing that the host name was updated!!

    Didn't think it would take so long.

Have another answer? Share your knowledge.