Can I redirect when Google is showing these as 2 different pages?
-
Hi Guys, Google webmaster is showing 1000 duplicate title tags because its picking up our pages like this. How can I correct this? Please explain in detail please. Thank You Tim /store/ICICLES_NO_7_CLEAR_WITH_PINK_NUBBY//store/ICICLES_NO_7_CLEAR_WITH_PINK_NUBBY
-
Thanks Man that helps a lot. We will implement asap and see if it takes care of the problem. Have a great weekend.
-
This post covers Apache redirects in-depth.
Read this if you don't want an entire overview:
"Part 4 - How can I add a trailing slash to requested URLs ?
Description of the problem:
Some search engines remove the trailing slash from urls that look like directories - e.g. Yahoo does it. However it could result into duplicated content problems when the same page content is accessible under different urls. Apache gives some more information in the Apache Server FAQ.
Let's have a look at an example: domain.com/google/ is indexed in Yahoo as domain.com/google - which would result in two urls with the same content.
Solution:
The solution is to create a .htaccess rewrite rule that adds the trailing slashes to these urls. Example - redirect all urls that do not have a trailing slash to urls with a trailing slash:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !example.php RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*)$ http://domain.com/$1/ [L,R=301]
Explanation of the add trailing slash .htaccess rewrite rule:
The first line tells Apache that this is code for the rewrite engine of the mod_rewrite module of Apache. The 2nd line sets the current directory as page root. But the interesting part is:
RewriteCond %{REQUEST_FILENAME} !-f
makes sure that existing files will not get a slash added. You shouldn't do the same with directories since this would exclude the rewrite behavior for existing directories. The line
RewriteCond %{REQUEST_URI} !example.php
excludes a sample url that should not be rewritten. This is just an example. If you do not have a file or url that should not be rewritten, remove this line. The condition:
RewriteCond %{REQUEST_URI} !(.*)/$
finally fires when a url does not contain a trailing slash. Now we need to redirect the urls without the trailing slash:
RewriteRule ^(.*)$ http://domain.com/$1/ [L,R=301]
does the 301 redirect to the url, with the trailing slash appended. You should replace domain.com with your url."
-
Hi Daniel, I understand it needs redirected. But for some reason I dont understand what that redirect would look like for just a trailing slash. Do you have an example. Sorry redirects are not my strong point. It is a apache server running linux.
-
You have a trailing slash canonical issue. There are two version of every page on your site. The slash version and the non-slash version.
Find out which version has the most links going to it. Using Open Site Explorer is one way. And then 301 redirect all of the pages from the less popular version to the more popular version.
Directions for a 301 redirect can be found in the Web Developer's SEO Cheat Sheet:
http://static.seomoz.org/user_files/SEO_Web_Developer_Cheat_Sheet.pdf
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
-
Why google does not remove my page?
Hi everyone, last week i add "Noindex" tag into my page, but that site still appear in the organic search. what other things i can do for remove from google?
Technical SEO | | Jorge_HDI0 -
Google Indexing Pages with Made Up URL
Hi all, Google is indexing a URL on my site that doesn't exist, and never existed in the past. The URL is completely made up. Anyone know why this is happening and more importantly how to get rid of it. Thanks 🙂
Technical SEO | | brian-madden0 -
Robots txt. in page with 301 redirect
We currently have a a series of help pages that we would like to disallow from our robots txt. The thing is that these help pages are located in our old website, which now has a 301 redirect to current site. Which is the proper way to go around? 1- Add the pages we want to disallow to the robots.txt of the new website? 2- Break the redirect momentarily and add the pages to the robots.txt of the old one? Thanks
Technical SEO | | Kilgray0 -
Google showing https:// page in search results but directing to http:// page
We're a bit confused as to why Google shows a secure page https:// URL in the results for some of our pages. This includes our homepage. But when you click through it isn't taking you to the https:// page, just the normal unsecured page. This isn't happening for all of our results, most of our deeper content results are not showing as https://. I thought this might have something to do with Google conducting searches behind secure pages now, but this problem doesn't seem to affect other sites and our competitors. Any ideas as to why this is happening and how we get around it?
Technical SEO | | amiraicaew0 -
Google Shows 24K Links b/w 2 sites that are not linked
Good Morning, Does anyone have any idea why Google WMT shows me that i have 24,101 backlinks from one of my sites ( http://goo.gl/Jb4ng ) pointing to my other site ( http://goo.gl/JgK1e ) ... These sites have zero links between them, as far as I can see/tell. Can someone please help me figure out why Google is showing 24k backlinks? Thanks
Technical SEO | | Prime850 -
Google is Showing Website as "Untitled"
My freelance designer made some changes to my website and all of a sudden my homepage was showing the title I have in Dmoz. We thought maybe the NOODP tag was not correct, so we edited that a little and now the site is showing as "Untitled". The website is http://www.chemistrystore.com/. Of course he didn't save an old copy that we can revert to. That is a practice that will end. I have no idea why the title and description that we have set for the homepage is not showing in google when it previously was. Another weird thing that I noticed is that when I do ( site:chemistrystore.com ) in Google I get the https version of the site showing with the correct title and description. When I do ( site:www.chemistrystore.com ) in Google I don't have the hompage showing up from what I can tell, but there are 4,000+ pages to the site. My guess is that if it is showing up, it is showing up as "Untitled". My question is.... How can we get Google to start displaying the proper title and description again?
Technical SEO | | slangdon0 -
Why does this page show it has 166 links in the crawll?
http://ensoplastics.com/theblog/?p=213 This is a page that shows up as having over a 100 links in the crawl, however I don't understand where those links are coming from?
Technical SEO | | ENSO0