Possible Duplicate:
apache redirect from non www to www
Is it possible to configure DNS to add www. prefix to the domain name?
Answer
Nope. You have to configure the webserver at yourdomain.com
to redirect to www.yourdomain.com
.
For example, on apache, you can use this configuration (using mod_alias
):
ServerName www.yourdomain.com
## Actual configuration here...
## redirect non-www to www
ServerName www.yourdomain.com
ServerAlias yourdomain.com
RedirectMatch permanent ^(.*) http://www.yourdomain.com$1
No comments:
Post a Comment