Purpose for www record

When I look at DNS Manager and examine a zone, in the A/AAAA Records section I'll see this

Hostname.   IP Address
www         w.x.y.z

What is that "www" record called? What is it's purpose? Is it needed if you have the blank default record?

3 Replies

Both of these are known as resource records. The first one will be returned for queries for example.com, and the second one will be used for queries for www.example.com. If you only have the first one, then a query for www.example.com would return nothing.

This is a bit of a holy war issue since the early days of the web, the general convention for websites is to point domain.com and www.domain.com to the same webserver and configure the latter to answer for both types of names, often redirecting from one to the other, so that the main URL remains consistent.

Thank you! I didn't realize that was it's purpose. As an aside, I've chosen to come down on the side of "domain.com" and use my Nginx config file to point "www.domain.com" to it.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct