| Important Announcement: *Lost Your Search Engine Traffic?* |
![]() ![]() |
Mar 15 2004, 12:15 AM
Post
#4
|
|
![]() Peanut Butter Lover ![]() ![]() ![]() ![]() ![]() Group: Active Members Posts: 502 Joined: 6-August 03 User's local time: Sep 5 2010, 11:10 PM Member No.: 319 |
Google tries hard to resolve them to the same location, but off the start it may see them as two different sites. Google finds them through different sites by following different links. Eventually they will resolve to the same location, which I generally think ends up being the one with the higher pagerank, which is usually the www. version
|
|
|
|
Mar 15 2004, 02:19 AM
Post
#5
|
|
![]() HR 4 ![]() ![]() ![]() ![]() Group: Active Members Posts: 148 Joined: 2-September 03 User's local time: Sep 6 2010, 05:10 AM From: Tampere, Finland Member No.: 713 |
You should 301 redirect yourdomain.com to www.yourdomain.com
|
|
|
|
Mar 15 2004, 08:58 AM
Post
#6
|
|
![]() High Rankings Advisor Group: Admin Posts: 29,994 Joined: 21-July 03 User's local time: Sep 5 2010, 11:10 PM From: Ashland, MA Member No.: 2 |
csjavi, can you explain how one would do that?
Thanks! Jill |
|
|
|
Mar 15 2004, 09:21 AM
Post
#7
|
|
![]() HR 4 ![]() ![]() ![]() ![]() Group: Active Members Posts: 148 Joined: 2-September 03 User's local time: Sep 6 2010, 05:10 AM From: Tampere, Finland Member No.: 713 |
I've used this in Apache:
CODE RewriteEngine on RewriteCond %{HTTP_HOST} !www\.mydomain\.com RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301] This one redirects any domain other than www.mydomain.com (mydomain.com, foo.mydomain.com, www.mydomain2.com...) to www.mydomain.com CODE RewriteEngine on RewriteCond %{HTTP_HOST} mydomain\.com RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301] This one redirects only mydomain.com to www.mydomain.com. |
|
|
|
Mar 15 2004, 11:45 AM
Post
#8
|
|
![]() HR 3 ![]() ![]() ![]() Group: Active Members Posts: 80 Joined: 24-July 03 User's local time: Sep 5 2010, 11:10 PM From: Plano, TX Member No.: 27 |
Now that's kewl. Thanks for posting it.
|
|
|
|
Mar 16 2004, 11:34 AM
Post
#9
|
|
|
HR 2 ![]() ![]() Group: Active Members. Posts: 24 Joined: 16-March 04 User's local time: Sep 5 2010, 11:10 PM Member No.: 2,901 |
Nice post of the rewrite code cs.
You can also do it at the root apache level by asking your host to either hardcode a 301 to your ServerName for domain.com or aim your ServerAlias to your ServerName |
|
|
|
Mar 16 2004, 04:00 PM
Post
#10
|
|
|
HR 2 ![]() ![]() Group: Members Posts: 14 Joined: 15-March 04 User's local time: Sep 5 2010, 11:10 PM From: Middle Earth Member No.: 2,891 |
Excellent, thats tip of the day for me, thanks CS (IMG:http://www.highrankings.com/forum/style_emoticons/default/naughty.gif)
|
|
|
|
Mar 16 2004, 06:57 PM
Post
#11
|
|
![]() Paz ![]() ![]() ![]() ![]() ![]() ![]() Group: Active Members Posts: 702 Joined: 4-March 04 User's local time: Sep 5 2010, 11:10 PM From: Spain Member No.: 2,763 |
I think this could definately help me..
I am using ws ftp pro . how do i insert this code.. to where? I only thought my domain was at www. blahh blahh, not without the www. prefix.. how do i find my 'actual' domain then. i see my index html and i only really change that one |
|
|
|
Mar 16 2004, 08:31 PM
Post
#12
|
|
|
HR 2 ![]() ![]() Group: Members Posts: 14 Joined: 15-March 04 User's local time: Sep 5 2010, 11:10 PM From: Middle Earth Member No.: 2,891 |
Hi There,
To make use of that code above you have to add it to your .htaccess file witch will be in the root directory of your website. If you can not see this file (guessing here as I use SmartFTP not ws_FTP) there will be an option in Tools > Options or Tools > Settings somewhere that will have a "Show All Files" or similar check-box. Check this and refresh your remote view to see the .htaccess file. If you still cant see a .htaccess file you probably don't have one, simply create a text file called htaccess.txt, add this code: CODE RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain.com RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L] NOTE: change yourdomain.com to your actual domain (IMG:http://www.highrankings.com/forum/style_emoticons/default/unsure.gif) Save the file and upload it to your root directory. Rename the file to .htaccess once you have uploaded it and type in http://yourdomain.com in your browser and you'll know that if you are true geek by getting excited watching the browser go to http://www.yourdomain.com NOTE: .htaccess files are inclusive and last option rules. This means that you can set up an .htaccess file within the root directory of your website and it will be applicable to the rest of the downstream folders. If another .htacess file is in a sub-folder, the two are "added" together. Any commands that are contradictory are not debated. The last one processed wins. So an .htaccess file in a sub-folder would override any contradictory rules set previously in the parent folder. (I just read about this) Hope this helps (IMG:http://www.highrankings.com/forum/style_emoticons/default/naughty.gif) |
|
|
|
Mar 17 2004, 09:16 AM
Post
#13
|
|
![]() HR 2 ![]() ![]() Group: Active Members Posts: 20 Joined: 7-August 03 User's local time: Sep 5 2010, 11:10 PM From: Pittsburgh, PA Member No.: 380 |
Not to seem like a total doofus :tooth: but is the code different if the site is hosted on an NT server? I'm only asking 'cuz I cannot get the .htaccess code to function.
|
|
|
|
Mar 17 2004, 09:48 AM
Post
#14
|
|
![]() HR 10 Group: Moderator Posts: 7,811 Joined: 24-July 03 User's local time: Sep 5 2010, 11:10 PM From: Somerville, MA Member No.: 22 |
Windows servers don't use .htaccess. Instead, you have to enter what you want in the Internet Services Manager snap-in.
Here's a page from Microsoft that should cover what you need: http://support.microsoft.com/default.aspx?...;EN-US;q324064& HTH! |
|
|
|
Mar 17 2004, 11:38 AM
Post
#15
|
|
![]() HR 2 ![]() ![]() Group: Active Members Posts: 20 Joined: 7-August 03 User's local time: Sep 5 2010, 11:10 PM From: Pittsburgh, PA Member No.: 380 |
thanks qwerty! (IMG:http://www.highrankings.com/forum/style_emoticons/default/cheers.gif)
|
|
|
|
Mar 17 2004, 03:18 PM
Post
#16
|
|
|
HR 2 ![]() ![]() Group: Members Posts: 14 Joined: 15-March 04 User's local time: Sep 5 2010, 11:10 PM From: Middle Earth Member No.: 2,891 |
Thanks Qwerty,
I should of clarified that a bit more I suppose, great link (IMG:http://www.highrankings.com/forum/style_emoticons/default/naughty.gif) Warm Wishes, |
|
|
|
Mar 17 2004, 07:31 PM
Post
#17
|
|
![]() Paz ![]() ![]() ![]() ![]() ![]() ![]() Group: Active Members Posts: 702 Joined: 4-March 04 User's local time: Sep 5 2010, 11:10 PM From: Spain Member No.: 2,763 |
Well this is al interesting reading all this stuff and at least i kinda learn something even if it is through a few nightmares...
i couldnt find that .htaccess file anywhere on my server, and it 'is' on unix as far as i know.. however beacause of problems previously i deleted everything off my server including all the privacy files etc etc cos i figured i wasnt going to use them anyway... however as i say, reading is interesting...... i was having probs with multiple urls... so, ive tried doing one of those redirects.. in the past i thought what is the point redirecting my home page to my home page, but hey ive just tried it... now i just typed in myurl.com without the www and it 'did' change in browser as u prediced it would if i did it the other way..... u see my url actually ends / if i had a folder called this i would have understood earlier i think, but as i only ever used my domain with www. prefix and the index.html file i just didnt see that i could redirect using my hosts programme.... ok.... so i am redirecting my home page...... i have another 29 pages up to now... this seems to imply that i must redirect every single page really then ?! ..because i am (if i get this right) `my domain is actually without the www. but in my ignorance i entered it with' it, have links to it and submitions to it.. i always thought a www. was necassary.. ok, if u are still with me..... do i redirect every page of my site and if so will that hurt me somehow in any search engine results.......? or/ do i redo the whole thing almost, resubmit and wait weeks for the results possibly with my 'actual' domain name without the www. .......? awaiting instructions by you experts once more |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 5th September 2010 - 10:10 PM |