Urgent request - IP address is showing in Google Search

Discuss Search Engine Optimization in relation to Joomla! 3.x. This forum will also have discussions on SEF/SEO Joomla! 3.x extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
ismaelhaider
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Wed Aug 26, 2009 2:45 pm

Urgent request - IP address is showing in Google Search

Postby ismaelhaider » Sat Sep 09, 2017 9:29 am

Hello Folks,
I am tired to fix this issue,I dont know where is the actuall problem.

Hello,

I have configured LAMP,Apacche,Joomla,mysql everything is working fine.
My Domain Registrar is Godaddy
My hosting is DigitalOcean , Now website is working fine with domain name,But it also accessible using IP address and I saw in google search some time my IP address is showing.
Image
Image
https://prnt.sc/gizi52
http://prntscr.com/gizihf

itoctopus
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3984
Joined: Mon Nov 25, 2013 4:35 pm
Location: Montreal, Canada
Contact:

Re: Urgent request - IP address is showing in Google Search

Postby itoctopus » Sat Sep 09, 2017 9:36 am

In your .htaccess file, add the following lines:

Code: Select all

RewriteCond %{HTTP_HOST} ^111\.111\.111\.111
RewriteRule (.*) http://www.[yourdomain].com/$1 [R=301,L]


You will need to replace 111.111.111.111 with the IP address of your site (do not forget to add the forward slash "\" for escaping as it is demonstrated in the above example). The above will ensure that any traffic going to the IP of the site will be redirected to the domain.
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter

ismaelhaider
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Wed Aug 26, 2009 2:45 pm

Re: Urgent request - IP address is showing in Google Search

Postby ismaelhaider » Sat Sep 09, 2017 9:39 am

Dear itoctopus,

I will try to add this code and let you know,By the way how i know again that my ip is not indexed in google.Is there any way to check ?

itoctopus
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3984
Joined: Mon Nov 25, 2013 4:35 pm
Location: Montreal, Canada
Contact:

Re: Urgent request - IP address is showing in Google Search

Postby itoctopus » Sun Sep 10, 2017 10:03 am

If you do a 301 redirect then all the links will be automatically de-indexed by Google. This process will be slow though.
http://www.itoctopus.com - Joomla consulting at its finest
https://twitter.com/itoctopus - Follow us on Twitter

ismaelhaider
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Wed Aug 26, 2009 2:45 pm

Re: Urgent request - IP address is showing in Google Search

Postby ismaelhaider » Mon Sep 11, 2017 7:21 am

I only added a code which gave me

Code: Select all

RewriteCond %{HTTP_HOST} ^111\.111\.111\.111
RewriteRule (.*) http://www.[yourdomain].com/$1 [R=301,L]


Now It will redirect all links or just homepage? I only want to redirect page where ever my ip is showing on any links.

IF my link is www.192.12.34.12.com/contact-us
Then it will make 301 , www.mydomain.com/contact-us
correct ?

or it will only redirect www.192.12.34.12.com to www.mydomain.com

Rickie
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Sun Jun 14, 2015 3:50 pm
Contact:

Re: Urgent request - IP address is showing in Google Search

Postby Rickie » Tue Sep 12, 2017 6:50 am

If..
RewriteCond = [111\.111\.111\.111]
RewriteRule = [yourdomain]

then the rule refers to every URL that contains the given condition.
Example:
condition: www.[111\.111\.111\.111].com/my-page-1.html
rewritten as www.[yourdomain].com/my-page-1.html
Nützliche Ratschläge, Neuigkeiten, Design Ressourcen für Webdesigner und Webentwickler: https://www.popwebdesign.de/popart_blog/de/


Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 3.x”

Who is online

Users browsing this forum: No registered users and 2 guests