I'm using some fictional IP addresses here, but the problem is real.

My default A Record:

* # this is for anysubdomain.example.com, I suppose
@ # and this is for example.com
www # this is for www.example.com

There are also these entries. What do they do in this context? My MX records are elsewhere.


Now I'd like to point to my own server. Let's say that my IP is I would then write:


Is that correct? I read something about * IN A - what's that notation?

Assuming my application runs on, everything should be fine, right? I am new to the A records concept and I'd like to ask before changing and deconstructing my system.


If I understood correctly, you want your root domain (aka example.com) to resolve to In this case, all what you have to do is to create an A record that points to that IP

example.com A

depending on your DNS hosting interface, you may either need to leave the record name empty (to match example.com) or other providers asks you to reference it with @. In that case

@ A

If then you also what the www hostname (aka www.example.com) to map to the same server, you can either add another A record

www A
# or depending on your DNS hosting interface
www.example.com A

or a CNAME to the root domain

www CNAME example.com
# or depending on your DNS hosting interface
www CNAME @

The wildcard records *.example.com allows you to map any subdomain of a specific level to a server. For instance

*.example.com A

will map any one-level subdomain of example.com (including www.example.com but not example.com root domain) to that IP. It also works with a CNAME

*.example.com CNAME example.com

You should avoid wildcards unless you really need it, for instance for a subdomain-based multi-tenant application

Note. In my examples I always use the format


but how you create those records and the order of the items depends on your DNS hosting provider interface.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.