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
-
If I want clean up my URLs and take the "www.site.com/page.html" and make it "www.site.com/page" do I need a redirect?
If I want clean up my URLs and take the "www.site.com/page.html" and make it "www.site.com/page" do I need a redirect? If this scenario requires a 301 redirect no matter what, I might as well update the URL to be a little more keyword rich for the page while I'm at it. However, since these pages are ranking well I'd rather not lose any authority in the process and keep the URL just stripped of the ".html" (if that's possible). Thanks for you help! [edited for formatting]
Technical SEO | | Booj0 -
Redirecting pages from a website to another
Hello Moz community, I’ve got a question and hope you can help! I’ve been working to improve my website’s ranking for the keywords “singing lessons London”. My current website url is http://www.sonic-crew-london.com and the page dedicated to the singing lessons is http://www.sonic-crew-london.com/booking/singinglessons.php I’ve recently bought the url http://www.singing-lessons-london.com which I hope will help to climb Google’s ranks a bit more easily for my chosen keywords. I thought I could redirect the old singing page to the new url. Is that something you would recommend me to do? Is there any specific procedure I should follow to make sure the transition runs smoothly? Any help really appreciated! Many thanks
Technical SEO | | SonicCrewLondon0 -
Should I remove these pages from the Google index?
Hi there, Please have a look at the following URL http://www.elefant-tours.com/index.php?callback=imagerotator&gid=65&483. It's a "sitemap" generated by a Wordpress plug-in called NextGen gallery and it maps all the images that have been added to the site through this plugin, which is quite a lot in this case. I can see that these "sitemap" pages have been indexed by Google and I'm wondering whether I should remove these or not? In my opinion these are pages that a search engine would never would want to serve as a search result and pages that a visitor never would want to see. Attracting any traffic through Google images is irrelevant in this case. What is your advice? Block it or leave it indexed or something else?
Technical SEO | | Robbern0 -
HELP: Wrong domain showing up in Google Search
So i have this domain (1)devicelock.com and i also had this other domain (2)ntutility.com, the 2nd domain was an old domain and it is not in use anymore. But when i search for devicelock on Google, the homepage devicelock.com does not exist. Only ntutility.com comes up. I asked one of the developer how the redirect is happening from the old domain to the new one and he told me its through a DNS forward. And there is no way to have an .htacess file to set up a 301 instead. Please help!
Technical SEO | | Devicelock0 -
Redirecting over-optimised pages
Hi One of my clients websites was affected by Penguin and due to no 'bad link' messages, and nothing really obvious from the backlink profile, I put it down to over-optimisation on the site. I noticed a lot of spammy pages and duplicate content, and submitted recommendations to have these fixed. They dragged their heels for a while and eventually put in plans for a new site (which was happening anyway), but its taken quite a while and is only just going live in a couple of weeks. My question is, should I redirect the URLs of the previously over-optimised pages? Obviously the new pages are nice and clean and from what I can tell there are no bad links pointing to the URLs, so is this an acceptable practice? Will Google notice this and remove the penalty? Thanks
Technical SEO | | Coolpink0 -
Can I optimize two different pages with very similar keywords without hurting SEO?
Hi there, I have often heard that you cannot have multiple pages rank for the same keyword. My question here is more about long tail keywords who have the same keyword phrase repeated on different pages. For Example: I have two webpages with different content. I want to have one page (Homepage) rank for the more generic term such as "innovation management" and another supporting page rank for "innovation management software". Will Google see these two different webpages as competing? Should I avoid repeating the more general term in the phrase? Has anyone ever seen your SEO results decline when doing this? I don't believe this is duplicate content since the pages hold completely different copy and assets but I am not sure if the repeating phrase in the title tags will flag anything to the search engines.
Technical SEO | | Scratch_MM0 -
Google description showing latest post excerpt
In doing a search for our website, The Tech Block, I realized that our description is not showing what we have in our Yoast settings, but rather the content from the slider: http://d.pr/i/kGjB What can I do to fix this?
Technical SEO | | ttb0 -
Google Confusion: Two Sites and a 301 Redirect.
Hi, We have a client who just sprang a new project on us. As always, they went ahead and did some stuff before bringing us into the loop! (oh the joy of providing SEO services!) Anyway, i'm pretty swamped right now and need some extra brains on this. Basically the client had www.examplesiteA.com online for many years (an affiliate site which had built up a strong brand in the industry). They have now decided to turn this affiliate site into a full blown service platform and so with the new site being built they 301'd the whole thing over to www.examplesiteB.com - this is where they want all the old affiliate content to be hosted. So essentially examplesiteA.com is now examplesiteB.com and a new site is being placed on examplesiteA.com - still with me? So this has all happened and a brand new website is on examplesiteA.com and the old examplesiteA is now sitting exactly as it used to, but on the examplesiteB domain. The 301 redirect has been removed and the new examplesiteA seems to have been crawled, but the homepage is not indexed. When you search for examplesiteA, examplesiteB is the top result. Now they are similar domain names and to be fair I have very little data at this point i.e. I don't know when the 301 redirect was removed and it maybe that this all fixes itself with time. How is link equity effected now that examplesiteA.com was 301 redirected to examplesiteB.com and cached in this way, but now the 301 redirect has been removed and does not exist? Would link juice have been diluted throughout the process? Obviously if we had been in on all this before anything was implemented we would have done things differently. Interested to hear what others would do coming in at this point. Thanks and look forward to the advice!
Technical SEO | | MarcLevy0