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

Distributed Quick Question : Domain & DNS records

Discussion in 'Tech Support' started by happysack, 19 May 2012.

  1. happysack

    happysack goodateverthinger

    Joined:
    19 Dec 2009
    Posts:
    408
    Likes Received:
    10
    Afternoon just a quick question.

    When i goto http://www.mywebsite.co.uk/index.php i see my site however when i do it without the www. i do not get it and i get a page cant be displayed.

    I also dont see my website if I go directly to my see ie (without the index.php) and it doesnt auto push forward. would i need to configure this on my domain registar site or code it ?( i thought it was automatic!0

    many thanks in advanced.
    hope this makes sense.
    Sure its easy to someone who knows this.
     
  2. phuzz

    phuzz This is a title

    Joined:
    28 May 2004
    Posts:
    1,712
    Likes Received:
    27
    You might have to add the mywebsite.co.uk domain (without the www) into the webserver.
    Basically, whichever software you're using as a web server (eg Apache, IIS etc.) will alow you to display different pages according to which domain name, or sub-domin the user has come in on, this would allow you to serve a different page (for example) to a French person who went to mywebsite.fr, and host everything on the same server.
    Because of this, some web servers will treat www.mywebsite.co.uk as being different to mywebsite.co.uk.
    Without knowing what web server software you're using I can't really tell you where in the config to look, but in IIS 7 it's called Alias's if I recall correctly. (web servers aren't really my forte I'm afraid, although I've had to fix this problem myself, a while ago)
     
  3. JimmyTheTrumpet

    JimmyTheTrumpet What's a Dremel?

    Joined:
    7 Jun 2012
    Posts:
    14
    Likes Received:
    1
    DNS records and default index file

    It sounds like you need to configure 2 things, both of which should be pretty straight forward hopefully. It does depend on the host you use, whether you are running the server yourself etc etc.

    www. not working

    First of all, the www bit now working. That sounds like a DNS issue. All you need to do in the control panel for your domain name under dns is make sure that you have a CNAME record pointing towards your non-www domain name. If you have your hosting with a provider, this should be enough. If you have set up the server yourself, phuzz's comment about the website responding differently for different addresses comes into play potentially.

    For example:

    [​IMG]

    Note: DNS changes can take a while to apply, so a little patience is required. Flushing your DNS cache on your local computer will help you get the new DNS as soon as possible:

    • Click Start Menu > Run
    • Type CMD
    • Press Enter
    • Type "ipconfig /flushdns" and press ENTER

    index.php not working

    This sounds like you need to change your default directory page. If you are on an Apache-based web server, you could possibly do it with an .htaccess file.

    • Create a plaintext file called ".htaccess" and type in the following:

    • Upload the file to the root of your website, unless there is already one there in which case append this line to the end of it

    Being able to modify the behaviour of your website with .htaccess files is limited by what your web host allows you to do.

    Hope this might get you somewhere.
     
  4. Atomic

    Atomic Gerwaff

    Joined:
    6 May 2002
    Posts:
    9,646
    Likes Received:
    94
  5. azrael-

    azrael- I'm special...

    Joined:
    18 May 2008
    Posts:
    3,852
    Likes Received:
    124
    Often you can use the wild card '*' when setting up the web server to avoid having to specify complete domain names. That is with *.mywebsite.co.uk set you could access the web site as www.mywebsite.co.uk or mywebsite.co.uk or blah.mywebsite.co.uk for that matter and it'd all point to the same site.
     
  6. munkey

    munkey What's a Dremel?

    Joined:
    24 May 2012
    Posts:
    62
    Likes Received:
    2
    @Jimmy the Trumpet
    That's the exact answer I was about to give, except better!
     
  7. JimmyTheTrumpet

    JimmyTheTrumpet What's a Dremel?

    Joined:
    7 Jun 2012
    Posts:
    14
    Likes Received:
    1
    Thanks :thumb:
     

Share This Page