DNS Records

Associate
Joined
6 Jan 2006
Posts
1,020
Location
Midlands
Hi,

Currently i have a website setup. It works fine via WWW.mysite.co.uk. However without the WWW it is pointing to the old server and site.

What DNS record do i need to change to make it point to the new server?

Thanks.
 

Pho

Pho

Soldato
Joined
18 Oct 2002
Posts
9,324
Location
Derbyshire
Create a CNAME for www pointing to mysite.co.uk

edit: having read Euology's post below I completely misread what you wanted. Hasty update:
CNAME: www - mysite.co.uk
A: * - mysite's IP address
 
Last edited:
Soldato
Joined
25 Mar 2004
Posts
15,686
Location
Fareham
Hi,

Currently i have a website setup. It works fine via WWW.mysite.co.uk. However without the WWW it is pointing to the old server and site.

What DNS record do i need to change to make it point to the new server?

Thanks.

Create an A record without the WWW prefix and point it to the same IP as the WWW record, then make sure the webserver is set to recognise the non WWW address as an address valid for the site.

I'm not familiar with other technologies and doing this but in IIS you simply add the non WWW address as a host header on the site.
 
Soldato
Joined
8 Oct 2005
Posts
4,185
Location
Midlands, UK
Create an A record without the WWW prefix and point it to the same IP as the WWW record, then make sure the webserver is set to recognise the non WWW address as an address valid for the site.

I'm not familiar with other technologies and doing this but in IIS you simply add the non WWW address as a host header on the site.

In apache just add the following to your htaccess file:

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yadada.com
RewriteRule (.*) http://www.yadada.com/$1 [R=301,L]
 
Associate
Joined
17 Oct 2006
Posts
1,173
Location
Bristol
I know this is an old thread but I am really confused after having read a load of guides on the internet. I've just bought a Vidahost package and changed the nameservers on 123-Reg to point to Vidahost's and all is working.

My problem is when I type www.domain.com it loads okay but then just shows domain.com. I want it to default to www.domain.com so even if you type domain.com it will load www.domain.com and show it with the www in front.

I know I have to change the record somehow but I am not sure what to. Amongst others, this is what I already have:

Name: domain.com
Type: A
Record: The IP address of the server

Name: www.domain.com
Type: CNAME
Record: domain.com

I am not too comfortable with just guessing in case the whole thing stops working. Please help!
 

daz

daz

Soldato
Joined
18 Oct 2002
Posts
24,073
Location
Bucks
If you're using Wordpress or another CMS, you should probably set the 'Site URL' in the admin area to include the www.
 
Back
Top Bottom