Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Domain times out when no www is prefixed.

  • 11-05-2014 03:54PM
    #1
    Registered Users, Registered Users 2 Posts: 1,689 ✭✭✭


    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, Registered Users 2 Posts: 9,534 ✭✭✭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, Registered Users 2 Posts: 1,689 ✭✭✭Media999


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


  • Registered Users, Registered Users 2 Posts: 41 Jamie_


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


  • Registered Users, Registered Users 2 Posts: 1,689 ✭✭✭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, Registered Users 2 Posts: 1,689 ✭✭✭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, Registered Users 2 Posts: 7,742 ✭✭✭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,863 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, Registered Users 2 Posts: 1,689 ✭✭✭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