Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Domain times out when no www is prefixed.

Options
  • 11-05-2014 4:54pm
    #1
    Registered Users Posts: 1,687 ✭✭✭


    Anyone know why a page would timeout when contacting through domain.com instead of www.domain.com

    Ive just migrated to a new dedicated server.

    Could it be the htaccess file or the domain setup?

    Only IP was changed from what i can see.


Comments

  • Registered Users Posts: 9,605 ✭✭✭gctest50


    DNS/webserver not setup properly

    (this can break auth stuff if your visitors are a bit inconsistent -visit one day with www and the next day without and then whine about

    it , you could redirect it, but there still may be whining )


    apache , tell it to serve pages when asked without the www :

    <VirtualHost *>
    ServerName domain.com
    ServerAlias www.domain.com
    # ...
    </VirtualHost>

    IIS sort of craic :

    http://support.simpledns.com/kb/a87/configure-web-site-access-with-without-www-domain-name.aspx


    and add a line into the dns so you have
    www.domain.com (yip thats us )

    domain.com (yip thats us too )


    i'm sure there is many other better ways

    .


  • Registered Users Posts: 1,687 ✭✭✭Media999


    Which record specifically? All i did was change the IP.


  • Registered Users Posts: 41 Jamie_


    It's not the DNS is it? You need to edit the .htaccess file to add a redirect.


  • Registered Users Posts: 1,687 ✭✭✭Media999


    had this in HTaccess for literally years now and its worked fine.

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

    All i did was change IP to a different server.

    DNS Propagation maybe?

    Any ideas what file permission the htaccess should have. I have 644.


  • Registered Users Posts: 1,687 ✭✭✭Media999


    Seems to work now. Htaccess was having no effect until i downloaded. saved and re uploaded.

    File type maybe? Filezilla seemed to fix it.


  • Advertisement
  • Registered Users Posts: 7,739 ✭✭✭mneylon


    Do you have A records for both domain.tld and www.domain.tld?
    Even if the vhost in Apache isn't configured for both domain.tld and www.domain.tld you'd get to the server if there were A records - though it wouldn't load the vhost unless you're on a dedicated IP


  • Technology & Internet Moderators Posts: 28,792 Mod ✭✭✭✭oscarBravo


    Blacknight wrote: »
    Do you have A records for both domain.tld and www.domain.tld?

    Or an A for one and a CNAME for the other?


  • Registered Users Posts: 1,687 ✭✭✭Media999


    Blacknight wrote: »
    Do you have A records for both domain.tld and www.domain.tld?
    Even if the vhost in Apache isn't configured for both domain.tld and www.domain.tld you'd get to the server if there were A records - though it wouldn't load the vhost unless you're on a dedicated IP

    Seems to be fine now.

    A record for www and domain.com and MX record.

    Then what i mentioned previously in the HTaccess which redirects non-www to www.

    Any other implications with SEO or anything im not thinking of from this setup? I also have error pages redirect to root.


Advertisement