Google Indexes My Website Using IP Address

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/">http://173.255.233.215/electronics/coklu-dokunmatik-ekran-yapimi/

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

Thanks..

2 Replies

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:

$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.

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.

RewriteCond %{HTTP_HOST} ^173\.255\.233\.215
RewriteRule (.*) http://teknikim.com/$1 [R=301,L]

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct