2008-10-15

Access your website without www in front

Today I had an assignment to make a site accessible without www in front of it.
As I am IT noob it was new for me so it took me some time.
So what you need to do is create a new Host (A) type DNS record which will point to your web server.

In Windows Server 2003 DNS role it is done like this:

1. Go to Administrative Tools and open DNS.
2. Navigate to Forward Lookup Zones and find the domain you want to make accessible without www.
3. Right click this domain folder and choose New Host (A).
4. Leave the Name field blank (will be the same as parent folder).
5. Enter IP address of your web server in the IP Address field and click Add Host.

If you host multiple sites on your web server you will probably need to do the following (if you host on IIS 6.0):

1. Open IIS manager on your web server.
2. Navigate to Web Sites and find your site.
3. Right click and open Properties.
4. On the Web Site tab next to IP Address click Advanced... button.
5. There you should already see "www.yourdomain.com" record, click Add and enter yourdomain.com in the Host Header value field. Click OK, close all dialogs and check if it works.

Links:
http://www.boutell.com/newfaq/creating/withoutwww.html

No comments:

Post a Comment