How can I prevent indexing of site without "www"

  • RichB
  • Guru
  • Guru
  • User avatar
  • Posts: 1121
  • Loc: Boston

Post 3+ Months Ago

I've noticed that google (and I think some other search engines) are indexing some of my pages with the "www" and some without. Is there any simple way to prevent this, so that they will only index the pages under the "www" - I've noticed that the google toolbar shows a lower page rank for most of my pages when they show without the "www" and I'm worried that it's diluting the page rank overall. I've already begun changing all the relative links in the pages to absolute links that lead to the domain with "www," but I'm wondering if there's something else I can do?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

I strongly suggest you always have everybody link to you with the www. attached in the front, and that all your internal links use that as well unless you are just linking to them relatively, which is also fine. Usually Google will not index both unless you have alot of sites linking to both domains with and without the www. If you look at ozzu without the www. you will see it has a pagerank of 0 simply because I have no inbound links to the site like that.

Now it shouldn't hurt your site if people are linking to you without the www. It just will not help the pagerank of the one with the www prefix.

Most servers simply setup the websites so that the domain loads the page and then the www subdomain is an alias to the domain which loads the exact same contents. That is how it is on my server as well. Now you could if you wanted create a redirect script for the domain without the www prefix to have a permant redirect to the one with your www. prefix which might solve your problem. But, really I wouldn't worry about it. I would just try to change the ones you can and make sure that for now on you never link to your own site, whether locally or externallly without the www prefix. Always link to the www subdomain.
  • RichB
  • Guru
  • Guru
  • User avatar
  • Posts: 1121
  • Loc: Boston

Post 3+ Months Ago

Yeah, a number of people linked to my site w/out the www and I think maybe google followed those links and then the relative links in my menus to some of my new pages that weren't already indexed under www, which is one reason why I added that "link to this page" textarea that always uses the www.

I'm hoping that changing the internal links to absolutes with www will prevent that from happening in the future. I'd like to do the permanent redirect thing, but I think that requires a .htaccess file and my current host doesn't allow me to use them, although I'm planning on switching to one that does in the near future. Meanwhile, I'm trying to get people who linked w/out the www to modify the inbound links. Thanks for the info.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Does it really mattter? All my clients sites are aliased with www

You can type in either and get the same results with google. Just curious. And all are ranked on the first page if you type the right keywords..


I suppose that's the issue that needs addressed by webmasters...what keywords and where to use them. I'm still trying to figure that one out.
  • RichB
  • Guru
  • Guru
  • User avatar
  • Posts: 1121
  • Loc: Boston

Post 3+ Months Ago

I think it matters only in terms of google's page rank, but of course that helps to determine where you show up in google's results, or at least that is how I understand it. My concern is that my page rank might be diluted by people linking w/out using the www since google was showing a much lower page rank for my site that way last time I checked.

I'm thinking that a permanent redirect might make google count them all as one, but I don't have that option until my current hosting package runs out and I switch to something better.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Yeah Google PageRank is unique for subdomains. So in terms of Google PageRank all the following are treated uniquely (basically as different websites):

http://bigwebmaster.com/
http://www.bigwebmaster.com/
http://uts.bigwebmaster.com/
http://guestbook.bigwebmaster.com/
http://exterminator.bigwebmaster.com/

Yes www and just the domain without www are treated differently and it can be diluted some if half are linking to one, and the other half linking to the other. So even though they probably show the same identical stuff, the one with the higher PageRank will likely be shown higher on Google than the other (google might even remove the lower pageranked one from the index since its a duplicate, not sure entirely). Now the fact that all inbound links aren't going to one, then it could be diluted for each because if they were all going to the www one for instance, then the pagerank would be higher for it most likely, thus causing them to even have better SERPs (Search Engine Ranking Positions) compared to other sites because of the higher pagerank (caused by an increase in backlinks).

So ATNO/TW, it is important, and I would't try to mix the two. If you prefer your site without the www then always use it without the www in all cases. If you prefer it with the www then use it with the www in all cases. What I have found is that you are safest to use it with the www because many people on the internet are just programmed to type www. before any domain which means if you never use the www it is likely that some people will link to you with the www in front.

Now in RichB's case I definetly think he should focus on one way and get people to change how they link to him, if possible, and make sure to do it the same way all the time. It would probably just be best though to focus on getting new links to the domain and forget about the others, unless they are coming from a really high pageranked site. In other words its probably not worth the time unless it has a high PR.
  • MsLady
  • Newbie
  • Newbie
  • MsLady
  • Posts: 7
  • Loc: Canada

Post 3+ Months Ago

I am ticked. I had updated all the pages on my website and its being cached in the search engines with www which is the old pages. But without the www shows the new pages. Help? I have a large site, what can I do so all my new pages show with www or without www

MsLady
  • Mas Sehguh
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1853

Post 3+ Months Ago

Just set up a redirect, so that everybody going to the www subdomain gets redirected with an HTTP header, Location: <url>

replacing <url> with the full path, of course.

Google will follow this, as will Web browsers.
  • MsLady
  • Newbie
  • Newbie
  • MsLady
  • Posts: 7
  • Loc: Canada

Post 3+ Months Ago

Thank yo so very much for reply, can you take me through this step by step, I am not the best web mistress but I sure listen well. DO I do this in my account manager on my server? or in macromedia?

I really appreciate you helping me

MsLady
  • MsLady
  • Newbie
  • Newbie
  • MsLady
  • Posts: 7
  • Loc: Canada

Post 3+ Months Ago

Another problem I have is that my site with www has a ranking and my site without has no ranking. I need the site without www to no seen but it has no ranking. I can't figure it out, when I made my webpages and I look them up they showe without the www. I can't even figure out how to change my links on my pages. I am using macromedia and when I link the page it show the link without the www and I need it with the www. I have tried entering the links manually but thats not working either, it just doubles up the ULR.

MsLady (I am so lost)
  • quantumcloud
  • Proficient
  • Proficient
  • User avatar
  • Posts: 456
  • Loc: Dhaka, Bangladesh

Post 3+ Months Ago

You need to set up a 301 permanent redirect to transfer all trafiic and links to http://www.domain.com from domain.com. You can set it up in the .htaccess file with the following code:

Code: [ Select ]
redirect 301 / http://www.you.com/


This would redirect any and all links to http://www.domain.com/

If you don't know about .htaccess files then do this:
Check the root folder of your site for a .htaccess file. The file name is ".htaccess" it's not an extension. If you have it then just add the above line to the file in a notepad. This file is hidden. Use smartftp to see the hidden files in your web directory.

If you do not have it already then create a text file in the notepad with the above line and name it .htaccess. When naming use ".htaccess" to avoid adding a .txt extension. Upload it to the root directory. Done.

//Added: This would also solve your second problem with dreamweaver. Since this redirect will simply add http://www.domain.com before all links. I don't know what you are trying to do in dreamweaver. lol. But if the linking is working then just let it be.
  • MsLady
  • Newbie
  • Newbie
  • MsLady
  • Posts: 7
  • Loc: Canada

Post 3+ Months Ago

KK..I have an htpaccess folder.......question tho..how come my webpages are saving without the www in them? I am looking at someof my links and none have the www which is where the ranking is. But the pages with no www are the new pages., how do I save my pages with the www when I save as?

MsLady
  • quantumcloud
  • Proficient
  • Proficient
  • User avatar
  • Posts: 456
  • Loc: Dhaka, Bangladesh

Post 3+ Months Ago

Sigh. Post a link code as it is in your page.
  • MsLady
  • Newbie
  • Newbie
  • MsLady
  • Posts: 7
  • Loc: Canada

Post 3+ Months Ago

Any chance I can get a private emailaddress so I can show you whats happening by sending you the links for the pages? I sell adult lingerie and leather and toys and in case a child is using this site I really don't want to post here. Hope you can understand. Being a mom alone I wouldn't want my kids to see what I sell and out of respect for the forum.

MsLady
  • quantumcloud
  • Proficient
  • Proficient
  • User avatar
  • Posts: 456
  • Loc: Dhaka, Bangladesh

Post 3+ Months Ago

Check your Private message.
  • MsLady
  • Newbie
  • Newbie
  • MsLady
  • Posts: 7
  • Loc: Canada

Post 3+ Months Ago

I sent you an email jamil

MsLady
  • alien
  • Novice
  • Novice
  • alien
  • Posts: 30

Post 3+ Months Ago

Add this to your .htaccess file:

Code: [ Select ]
RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\..* [NC]
RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301]
  1. RewriteEngine On
  2. RewriteCond %{HTTP_HOST} !^www\..* [NC]
  3. RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301]
  • MsLady
  • Newbie
  • Newbie
  • MsLady
  • Posts: 7
  • Loc: Canada

Post 3+ Months Ago

Can you tell me what this is telling my site to do?

Thank you
MsLady
  • alien
  • Novice
  • Novice
  • alien
  • Posts: 30

Post 3+ Months Ago

This will do a 301 redirect to the "www" version if the site is accessed without the "www". And everything after the domain.com will be redirected as well, for instance,:
http://domain.com/somefiles.html -> http://www.domain.com/somefiles.html
http://domain.com/directory/ -> http://www.domain.com/directory/
  • lioness
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1615

Post 3+ Months Ago

alien wrote:
Add this to your .htaccess file:

Code: [ Select ]
RewriteEngine On

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


Awesome - I've been looking around for this for a few days. Other methods did not work for me. Thought I'd bump this for anyone else interested 8)
  • Patric
  • Born
  • Born
  • Patric
  • Posts: 1

Post 3+ Months Ago

Hello, new member here... Was online looking for this almost exact solution, but the other way around actually ;)...

Would someone be so kind in assisting me on this ? How would I change this snippet to direct me to the non triple w URL ?

that is I want everybody/everything to go to http://myurl.com without the www.

Oh so greatful for answer :)

Patric.

EDIT--> I got it: http://no-www.org/index.php

the code to go the other way is this:
Code: [ Select ]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L] *
  1. RewriteEngine On
  2. RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
  3. RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L] *


Just swap the domain.com for your URL.

Patric.

Post Information

  • Total Posts in this topic: 21 posts
  • Users browsing this forum: No registered users and 6 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.