Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Related to this question: What’s the point in having “www” in a URL?

How can I do a “www” redirection form a DNS record level? I don’t want to tweak apache or IIS to achieve this.

share|improve this question
up vote 8 down vote accepted

Only through web server. DNS is not suitable if you want to domain redirection.

Domain redirection:

  • HTTP 3xx response
  • refresh meta tag
  • JavaScript redirects

All techniques use web server.

share|improve this answer

you cannot do redirection in DNS however you can define CNAME entry for www

share|improve this answer

Point to your "naked" domain record to IP. It is free service. More info at

share|improve this answer

If your web server is configured in meaningful way, you can just add two records that point to same server. Usually it's not important to have specific address in user's address bar (what is the difference if user sees or

As already answered, you can't redirect client on DNS level. In web server, you don't have to modify web server configuration, if both virtual hosts (with and without www) point to place where you can put your own scripts. For example, in PHP you can just write


to redirect visitors to (without www).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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