I have mydomain.com that is hosted on an Azure VM instance called mymachine.cloudapp.net

I need to configure DNS so that both www.mydomain.com and mydomain.com get mapped to the same host. I'm using GoDaddy as registrar.

Currently GoDaddy offers me to create an empty (@) A record, so that if I ping mymachine.cloudapp.net and resolve its VIP address I can store it in the A record.

Unfortunately, if the VIP changes and I forget to re-ping I get mydomain.com unreachable, and that's normal.

When I try to move that @ record to the CNAME section so it best points to the VM hostname, I get the following error:

A record of a different type exists for the hostname @, could not create CNAME

This occurs both if I delete the A record and write CNAME, and if there is no @ record in the A section.

How can one set a @ CNAME record in a GoDaddy managed domain?

2 Answers 2


In short, you can't make the @ record a CNAME without deleting all other resource records for @, and you can't do that since some (like the NS records) are required for proper DNS functionality. This is one reason why providers such as Heroku tell you not to use naked domain names.

You will need a host to perform the HTTP redirection from example.com to www.example.com for you, to which you will point A (and AAAA) record for @.

If your DNS is hosted with GoDaddy, then they have a free service that will do this for you. In your GoDaddy domain manager, look on the left hand side for "Forwarding" and click "Manage". Then set it to forward example.com to www.example.com and update your DNS to support the change. You should leave the Advanced Options at their defaults.

GoDaddy Domain Forwarding Control

  • 2
    Would Domain Forwarding also effect subdomains? I want to redirect all users to example.org to www.example.org Would enabling domain forwarding do that?
    – Ut xD
    Commented Nov 11, 2014 at 7:39
  • what if I want to pass arguments in the url? When I forward the url from the naked one that had url args passed in from the original request it strips away the query string of the url and just forwards me to the www. port of my site
    – Coty Embry
    Commented May 27, 2017 at 3:40
  • Godaddy forwarding from the bare url doesn't work with deep links anymore. It has a short-link feature that gets in the way. Commented Sep 26, 2018 at 19:47
  • 2
    GoDaddy forwarding also doesn't work when using HTTPS
    – Daniel
    Commented Mar 3, 2020 at 6:43
  • 1
    what if I dont want to redirect to www and I want to access the site directly example.com
    – Mukun
    Commented Jul 21, 2021 at 11:51

You can't add a new @ CNAME record without deleting all of the other records in GoDaddy.

Instead leave the CNAME records as they are, and set the A (Apex) Record like mentioned in the docs http://surge.sh/help/adding-a-custom-domain enter image description here

It should look like this:

; A Records
@   1800    IN  A

or in the GUI:

Type: A
Name: @
Points to:
  • Not sure how this answers the question? The question specified that an A-record was what was currently being done, but it wasn't a good fit for the moving ip address.
    – oligofren
    Commented Jan 22, 2018 at 16:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .