1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DNS Records

Discussion in 'HTML, Graphics & Programming' started by ultim, 23 Sep 2009.

  1. ultim

    Hitman

    Joined: 6 Jan 2006

    Posts: 983

    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.
     
  2. Pho

    Sgarrista

    Joined: 18 Oct 2002

    Posts: 9,135

    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: 23 Sep 2009
  3. HungryHippos

    Sgarrista

    Joined: 25 Mar 2004

    Posts: 8,588

    Location: Fareham

    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.
     
  4. AbsenceJam

    Mobster

    Joined: 2 Nov 2007

    Posts: 4,304

    Usually for the A record you need to set the name to "@"
     
  5. suarve

    Mobster

    Joined: 8 Oct 2005

    Posts: 4,190

    Location: Midlands, UK

    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]
     
  6. Qu3

    Gangster

    Joined: 1 Jul 2009

    Posts: 457

    Location: 127.0.0.1

    Its surprising how many companies fail to set-up both.
     
  7. PistolPete

    Mobster

    Joined: 6 Sep 2008

    Posts: 3,993

    Location: By the sea, West Sussex

    That is true, however www.domain.tld is host www on domain.tld so it annoys me people who just type domain.tld and expect to find a host there.
     
  8. Nash

    Wise Guy

    Joined: 17 Oct 2006

    Posts: 1,174

    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!
     
  9. daz

    Capodecina

    Joined: 18 Oct 2002

    Posts: 23,997

    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.
     
  10. Nash

    Wise Guy

    Joined: 17 Oct 2006

    Posts: 1,174

    Location: Bristol

    Cool, thanks. I changed that and deleted the record in the Vidahost admin and put it back and it seems to work now :)