301 redirect for ip address in SERPs
-
Hi,
I've recently had the misfortune of my site's ip address being crawled and indexed by Google, which is causing some duplicate content issues. Due to the nature of the site we're not able to implement a canonical tag to fix this at present.
Would a 301 redirect do the trick, and if so, could someone point me to what I'd need to add to our .htaccess file?
Many thanks
Chris
-
Anytime! Let me know how it goes for you.
-
Thanks for your help. I'll give that a go and see what happens!
Cheers,
Chris
-
Here are a few 301 redirects that "might" work on an Apache server
I would always consider saving the original .htacess file
just in case these don’t work for you, as you can always resort back
301 a non-www to your www, as well as redirect your IP address as a 301 to your www.
RewriteEngine On
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www.domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
For just IP Redirection Use:
RewriteCond %{HTTP_HOST} ^12.34.567.890
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
Don’t forget to fill in the areas with your credentials
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Serp Stars?
Is there anyway of getting the Stars to show up for a home page? The issue is that 70% of our traffic goes to our home page and while we have stars for the product pages this only covers 30% of our traffic the other 70% goes to our home page and due to this not being a product page it does not have them. Would selling the product direct on this page allow us to have them? I appreciate any help.
Intermediate & Advanced SEO | | BobAnderson0 -
301 Redirects?
We have an e-commerce website with about 4500 products for sale. About 1200 of these items were not showing up in the Google PLA ads because they were $0 dollar items, so we made those products invisible. Then Set 301 Redirects for each of the 1200 items. My question is this; we want to turn back on the 1200 items, should we delete the 301 redirects that are in place for them.? Will it hurt SEO performance by having them?
Intermediate & Advanced SEO | | Goriilla0 -
303 redirect
Hi, 303 redirect is a good thing or not ? I have a homepage in 2 languages FR and EN > mywebsite.com/fr/ and mywebsite.com/en/. A 303 redirect is on mywebsite.com to mywebsite.com/fr/. Thanks D.
Intermediate & Advanced SEO | | android_lyon0 -
How does Google treat chained 301 redirects?
I did the following two chained 301 redirects (A->B->C) Plural to Singular to New Domain A. http://domain1.com/filenames B. http://domain1.com/filename C. http://domain2.com/filename To new domain without www and then back to origining domain A. http://www.domain1.com/filename B. http://domain2.com/filename C. http://domain1.com/fifilename How much link juicy will be rediectetoto URL C in above two scenarios?
Intermediate & Advanced SEO | | Bull1350 -
Canonical OR redirect
Hi, i've a site about sport which cover matches. for each match i've a page. last week there was a match between: T1 v T2 so a page was created: www.domain.com/match/T1vT2 - Page1 this week T2 host T1, so there's a new page www.domain.com/match/T2vT1 - Page2 each page has a unique content with Authorship, but the URL, Title, Description, H1 look very similar cause the only difference is T2 word before T1. though Page2 is available for a few days, on site links & sitemap, for the search query "T2 T1 match" Page1 appears on the SERP (high location). of course i want Page2 to be on SERP for the above query cause it's the relevant match. i even don't see Page2 anywhere on the SERP and i think it wasn't indexed. Questions: 1. do you think google see both pages as duplicated though the content is different? 2. is there a difference when you search for T1 vs T2 OR T2 vs T1 ? 3. should i redirect 301 Page1 to Page2? consider that all content for Page1 and the Authorship G+ will be lost. 4. should i make rel=canonical on Page1 to Page2? 5. should i let google sort it out? i know it's a long one, thanks for your patience. Thanks, Assaf
Intermediate & Advanced SEO | | stassaf0 -
Why isnt my crawl results showing a 301 redirect even though I have a 301 rewrite in my .htaccess file?
Ive searched the previous Q&A's & cant find an answer so I;ll ask it here 🙂 crawling my site shows isnt the 301 redirect that i have from my non www to my www domainIts only showing all the results for my www subdomain.As i'm new to SEO & SeoMoz I dont fully understand. Any help would be greatly appreciated because my site is like 2 & a half years old & i'm trying to learn seo so I can rank higher in the serp's. Thanks
Intermediate & Advanced SEO | | PCTechGuy20120 -
301 redirect for duplicate content
Hey, I have just started working on a site which is a video based city guide, with promotional videos for restaurants, bars, activities,etc. The first thing that I have noticed is that every video on the site has two possible urls:- http://www.domain.com/venue.php?url=rosemarino
Intermediate & Advanced SEO | | AdeLewis
http://www.domain.com/venue/rosemarino I know that I can write a .htaccess line to redirect one to the other:- redirect 301 /venue.php?url=rosemarino http://www.domain.com/venue/rosemarino but this would involve creating a .htaccess line for every video on the site and new videos that get added may get missed. Does anyone know a way of creating a rule to rewrite these urls? Any help would be most gratefully received. Thanks. Ade.0 -
How do I go about changing a 302 redirect to a 301.
Hello Friends! Thanks for viewing my question. Ok,My question today is How do I go about redirecting a 302 link to a 301 link. I understand the benefits of doing this as far as link juice and how the Search Engines views the two Re-Directs. I am wanting to know where I would start to do this. Thank you in advance for any help or suggestions!
Intermediate & Advanced SEO | | FrontlineMobility0