DNS Records

Associate
Joined
6 Jan 2006
Posts
1,024
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.
 
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:
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.
 
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]
 
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!
 
If you're using Wordpress or another CMS, you should probably set the 'Site URL' in the admin area to include the www.
 
Cool, thanks. I changed that and deleted the record in the Vidahost admin and put it back and it seems to work now :)
 
Back
Top Bottom