Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Nov 20, 2010 7:12 pm 
Offline
Senior Newbie

Joined: Sun Nov 14, 2010 7:11 am
Posts: 5
Hi,
I've just noticed that google indexed some of my web pages using IP address.

Example: http://173.255.233.215/electronics/cokl ... an-yapimi/

How can I prevent Google to index pages like in the example above?
Thanks..


Top
   
 Post subject:
PostPosted: Sat Nov 20, 2010 7:55 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Configure your application or web server to redirect "incorrect" URLs to "correct" URLs. For instance, using lighttpd, http://www.hoopycat.com/ redirects to http://hoopycat.com/ using this:

Code:
$HTTP["host"] =~ "^www\.(.*)"
{
    url.redirect = ( "^/(.*)" => "http://%1/$1" )
}


Some call it "canonicalizing", others inexplicably call it "SEO", but (unlike the rest of the "SEO" homeopathy) it's easy to do and nearly always a good idea.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Sun Nov 21, 2010 5:35 am 
Offline
Senior Newbie

Joined: Sun Nov 14, 2010 7:11 am
Posts: 5
I'm using an apache server and I've added following code to the .htaccess file. Now it redirects ip to domain, thanks for your suggestion.
Code:
RewriteCond %{HTTP_HOST} ^173\.255\.233\.215
RewriteRule (.*) http://teknikim.com/$1 [R=301,L]


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group