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
-
Google keeps marking different pages as duplicates
My website has many pages like this: mywebsite/company1/valuation mywebsite/company2/valuation mywebsite/company3/valuation mywebsite/company4/valuation ... These pages describe the valuation of each company. These pages were never identical but initially, I included a few generic paragraphs like what is valuation, what is a valuation model, etc... in all the pages so some parts of these pages' content were identical. Google marked many of these pages as duplicated (in Google Search Console) so I modified the content of these pages: I removed those generic paragraphs and added other information that is unique to each company. As a result, these pages are extremely different from each other now and have little similarities. Although it has been more than 1 month since I made the modification, Google still marks the majority of these pages as duplicates, even though Google has already crawled their new modified version. I wonder whether there is anything else I can do in this situation? Thanks
Technical SEO | | TuanDo96270 -
Do Google Penalties Always Follow a Redirects to New Domains?
I have a couple sites that were penalized by Google for hosting content that made Google look bad. After a major newspaper showcased what was going on they suddenly took a major hit as if someone at Google flipped a switch and told their system not to rank the content for anything other than their brand names. The article made Google look bad because the newspaper highlighted a lot of unverified user generated accusations the reporters assumed not to be true in the context of "these accusations are mostly false, but they still show up on the first page when people search Google." I was thinking one way to fight this would simply be to host the content at a different domain, but I am concerned about the new domain being penalized as well. I don't want to completely shut down all of the original sites because some of them have brand recognition. The oldest domain is 12 years old with backlinks from several news outlets which is why the content ranked so well, but after the penalty that is only the case on Bing. I've read various articles about this tactic. Some say that you will almost always pass the penalty to the new domain if you do a 301 redirect, but the penalties at issue in those articles were for things like buying links or other black hat tactics. This is somewhat different in that I wasn't doing anything black hat, they just decided not to let the site rank for political reasons. I was hoping that maybe that type of penalty wouldn't follow it, but right now I am leaning towards simply creating a second site to syndicate articles. It will need to attribute the articles to their sources though, so they will need either no followed links or possibly a redirection script that bots cannot follow. I would really like it if I could simply change the first site to its .net or .org equivalent and 301 everything though.
Technical SEO | | PostAlmostAnything0 -
Thousands of 404-pages, duplicate content pages, temporary redirect
Hi, i take over the SEO of a quite large e-commerce-site. After checking crawl issues, there seems to be +3000 4xx client errors, +3000 duplicate content issues and +35000 temporary redirects. I'm quite desperate regarding these results. What would be the most effective way to handle that. It's a magento shop. I'm grateful for any kind of help! Thx,
Technical SEO | | posthumus
boris0 -
Is this okay with google if i can access my sub categories from two different path?
My website is url is abcd.com. One of my category url is abcd.com/mobile.aspx. Which contains 5 sub categories :- samung Mobile 2) Nokia Mobile 3) Sony Mobile 4) HTC Mobile 5) Blackberry Mobile Now if i go in to HTC Mobile sub categories i.e. abcd.com/htcmobile.aspx here i will see all the product related to HTC Mobile. But at below of all product i will find all sub categories that is samsung mobile, nokia mobile, sony mobile and blackberry mobile. So i want to task is this okay? Google will not count these categories as duplicate that is i can access all 4 categories i.e. samsung, nokia, sony and blackberry from here 1) abcd.com/mobile.aspx and 2) abcd.com/htcmobile.aspx Thanks! Dev
Technical SEO | | devdan0 -
When i type site:jamalon.com to discover number of pages indexed it gives me different result from google web master tools
when i type site:jamalon.com to discover number of pages indexed it gives me different result from google web master tools
Technical SEO | | Jamalon0 -
What can i do to get google to visit my site more often
Hi, i am having serious problems since i upgraded my website from joomla 1.5 to 3.0 We have dropped down the rankings from page one for the word lifestyle magazine, and we have dropped down in rankings for other very important words including gastric band hypnotherapy and i am starting to regret having the site upgraded. i am finding the google is taking its time visiting my site, i know this for two reasons, one i have checked the cache and it is showing the 2nd july and i have checked articles that we have written and they are still not showing. example if i put this article name in word for word it does not come up, Carnival Divert Ships In The Caribbean Due To bad Weather this was an article that was done yesterday. in the old days before the upgrade that would have been in google now. these problems are costing us the loss of a great deal of traffic, we are losing around 70% of our traffic since the upgrade and would be grateful if people could give me advice on how to turn things around. we add articles all the time. each day we add a number of articles, i was considering changing the front page in the middle and having a few paragraphs of the latest story to get google to visit more often. i know this would look messy but i am running out of ideas. any help would be great
Technical SEO | | ClaireH-1848860 -
Getting Google to index new pages
I have a site, called SiteB that has 200 pages of new, unique content. I made a table of contents (TOC) page on SiteB that points to about 50 pages of SiteB content. I would like to get SiteB's TOC page crawled and indexed by Google, as well as all the pages it points to. I submitted the TOC to Pingler 24 hours ago and from the logs I see the Googlebot visited the TOC page but it did not crawl any of the 50 pages that are linked to from the TOC. I do not have a robots.txt file on SiteB. There are no robot meta tags (nofollow, noindex). There are no 'rel=nofollow' attributes on the links. Why would Google crawl the TOC (when I Pinglered it) but not crawl any of the links on that page? One other fact, and I don't know if this matters, but SiteB lives on a subdomain and the URLs contain numbers, like this: http://subdomain.domain.com/category/34404 Yes, I know that the number part is suboptimal from an SEO point of view. I'm working on that, too. But first wanted to figure out why Google isn't crawling the TOC. The site is new and so hasn't been penalized by Google. Thanks for any ideas...
Technical SEO | | scanlin0 -
Redirect Flash Site for Google Only - Is this against TOS?
A photographer client has a flash website, purchased as from a (well respected) template company. The main site is at the root domain, and the HTML version is at www.example.com/?load=html If I visit the site on a browser without Flash installed, I am re-directed automatically to the HTML version. I'm concerned as the site has some great links and the HTML version is well optimised, but doesn't appear anywhere in Google for chosen keywords (ranks perfectly for brand related searches). Google is indexing the Flash version of the site, but I would rather it didn't (there's no real content (just Javascript to load the SWF) and all of the pages load under one URL). How can I block the Flash version from Google but still make the incoming links count towards the HTMl version of the site? If I re-direct Google to the HTML version, is this cloaking, and is it frowned upon? Thanks for any advice you can offer.
Technical SEO | | cmaddison0