SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Non-Member ssethi54's Avatar
    Join Date
    Oct 2013
    Location
    India
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to set www.example.com to example.com

    recently i redirect my blog to www.onlinehindi.in it ok with it but when i am trying to open with onlinehindi.in it is showing problem
    Last edited by ScallioXTX; Nov 8, 2013 at 13:39. Reason: delinkified url

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,031
    Mentioned
    152 Post(s)
    Tagged
    2 Thread(s)
    See http://datakoncepts.com/seo, section "Eliminate www for a Domain"
    Rémon - Hosting Advisor

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  3. #3
    SitePoint Wizard
    Join Date
    Oct 2005
    Posts
    1,832
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    I have seen websites that do not work without a "www" because there was no DNS entry for just the domain.

    http://www.zoneedit.com/lookup.html

    The A Record DNS entry for onlinehindi.in without a www shows:

    Code:
    DNS Lookup Results For:
    
    onlinehindi.in
    onlinehindi.in. 538 IN A 184.168.221.54
    The DNS entry for the www version of onlinehindi.in shows this for an A Record:

    Code:
    DNS Lookup Results For:
    
    www.onlinehindi.in
    ghs.l.google.com. 300 IN A 74.125.28.121
    It looks like you may have an issue there.

    Also, there is a CNAME for www.onlinehindi.in

    Code:
    DNS Lookup Results For:
    www.onlinehindi.in
    www.onlinehindi.in. 3600 IN CNAME ghs.google.com.
    If the original poster is trying to redirect www to no-www, this htaccess code will work after the DNS records are straightened out:

    Code:
    # Rewrite requests to www to non-www.
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
    RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
    All requests to http://www.example.com will be 301 redirected to http://example.com

  4. #4
    SitePoint Zealot
    Join Date
    Oct 2012
    Posts
    137
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi cheesedude Sounds like you understand all this DNS stuff much better than I do Hopefully you can answer a quick question for me...

    My site always uses the www version. The htaccess converts all non-www requests. The domain registration is separate from the webhosting and we use A Records to make the transfer.

    It all works well except some site monitoring programs that we want to use freak out when we enter our www version (they work for our non-www version AND they work for other www sites)

    Using the zoneedit tool you mentioned we get these results...

    Code:
    DNS Lookup Results For:
    easydigging.com
    easydigging.com. 600 IN A 173.236.29.66
    ...and...

    Code:
    DNS Lookup Results For:
    www.easydigging.com
    www.easydigging.com. 600 IN A 173.236.29.66
    ...which are identical. Any other clues of what our problem might be?

    Thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •