Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
  • 20 Domain Name Lot for sale with website (In: I Want to Sell My Website)
  • Domain name scam (In: Domains, Hosting, DNS and Server Issues)
  • Domain name registration scam (In: General Search Engine Optimization)
  • Featured Web Site Template

    Hundreds More at Free Site Templates.com!

    Web Site Partners
    Sponsored Links
    Jet City Software
     
    Whos Here ?
    Reflects user activity within the last 5 minutes
    Moderator(s): Prowler, jcokos
    Member Message

    Curt
    Joined: Eons Ago
    # Posts: 3747

    View the profile for Curt Send Curt a private message

    Posted: 2005-May-28 09:00
    Edit Message Delete Message Reply to this message

    How do I force the browser and the search engines to follow links in the form of "www.domain.com" instead of "domain.com"? I want all urls with "domain.com" to show in browser with "www.domain.com".

    I've tried altering the htaccess file by adding a line that looks like this:

    redirect 301 / http:// www.domain.com

    It didn't work right. I believe it caused some sort of circular page loading and the browser couldn't load the pages on the site after I added that line to the htaccess file. There must be some other way to force all URL's to default to the www.domain.com format for browsers and to ensure that search engines only index pages from the www.domain.com format only. I don't want the engines to index pages from domain.com (domain without the "www." ) .



    david68
    Joined: May 16, 2005
    # Posts: 144

    View the profile for david68 Send david68 a private message

    Posted: 2005-May-28 13:55
    Edit Message Delete Message Reply to this message

    Why not? "www" is basically being discontinued. Most sites don't need it anymore to be accessed.

    From "no-www dot org" ...

    This site tells you why "www" shouldn't be bothered with and how to make your domain work without it. This is how to tell your site to work without it, I assume it can be reversed to make it not worth without it...

    -quote-
    Class B means that all of the traffic to www.yourdomain.com is politely and silently redirected to http://yourdomain.com. This is currently the preferred no-www classification as it does not inconvenience your users, but it does assert the deprecated nature of the www subdomain.

    The process of making your domain a Class B is quite simple. All you need to do is create or modify a file called .htaccess located in the root directory of your site and add the following lines, changing the red text to match your domain.

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
    RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
    -end quote-

    I'm not sure if that helps but it's something I found awhile back.



    g1smd
    Staff
    Joined: Jul 28, 2002
    # Posts: 10465

    View the profile for g1smd Send g1smd a private message

    Posted: 2005-May-29 18:36
    Edit Message Delete Message Reply to this message


    Redirect from non-www to www for the whole site:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^domain.com [NC]
    RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]


    Your original one line code redirects only for one page.



    Curt
    Joined: Eons Ago
    # Posts: 3747

    View the profile for Curt Send Curt a private message

    Posted: 2005-Jun-09 13:34
    Edit Message Delete Message Reply to this message

    david68, I want to ensure that I don't get duplicate indexes in the SE's. It would not be good if the SE's index URL's with and without "www" in the URL. Since my domains have back-links to the "www" version, I don't want inadvertant future back-links to point to a URL version without the "www" and not have a way to redirect it to the "www" version.

    g1smd, Thanks a bunch. I'll give that a try. smile


    You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
    1. You have not yet logged in, or registered properly as a member
    2. You are a member, but no longer have posting rights.
    3. This is a private forum, for which you do not have permissions.

    If you are a recent member, it's possible that you simply have not yet confirmed your account. Please check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions contained within.

    If you cannot find this message, click here to Re-Send it.

    If you are still experiencing problem, please read the Login Assistance Article for some advice on what may be causing your login not to work properly.

    Switch to Advanced Editor and ... Create a New Topic or Reply to this Thread

    New posts Forum is locked
    © 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions