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
-
How to Choose destination page for a 301 redirect?
I am doing some SEO for a wedding chapel in Vegas. There are some old packages that no longer exist and the bounce rate for the page is high so I am planning to 301 the page. How to best determine the best 301 destination? I have a few options. As an example the page was optimized for garden weddings. The page itself does not place well in the SERPS for garden weddings in Las Vegas, but our outdoor wedding packages in Las Vegas page places in the top 10. So that page is in an option. However, there is a different location that has a garden setting. Is that a better choice? Some content might match better than others, but any page I choose would be relevant content. Thank you so much 🙂
Technical SEO | | leslieevarts0 -
What is the difference between 301 redirects and backlinks?
i have seen some 301 redirects on my site billsonline, can anyone please explain the difference between backlinks and 301 redirects, i have read some articles where the writer was stating that 301 are not good for website.
Technical SEO | | aliho0 -
Why google removed my landing pages from index?
I made new website meko.lv. I put many work to it, to make page SEO friendly, sprites, reduced requests added SSL, got google page speed insights score 100/100, but in 2. october all pages in google webmasters disappeared from index. Could you please look at website and say whats wrong with it? They are all search results present in google but for how long. it is so annoying, you put so many work but in result get high spam score. It is obvious that new pages can not get good links in one month https://meko.lv/ google webmasters google page speed score: https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fmeko.lv%2F&tab=mobile q1LDHTn
Technical SEO | | Mekounko0 -
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 -
ALT attribute keyword on the same image but different pages
Hi there, As i'm sure you're probably aware, moz advises to use a keyword within the ALT attribute on pages... On a new website I am launching, I have the ability to add an alt keyword to image headers. On multiple pages we have the exact same image but with different keywords associated them inside the alt attribute. The image itself is a collage of different images and so the keywords used can, quite sneakily, match the image. My question is therefore, will using different keywords on the same image on different pages have a negative effect on SEO? Thanks, Stuart
Technical SEO | | Stuart260 -
Same language selector on 2 different Multilingual domains?
Hello I hope you can help me to clarify my doubts I have a multilingual domain www.domain.com structured like this: www.domain.com www.domain.com/es/ www.domain.com/fr/ www.domain.com/it/ www.domain.com/de It contains a language selector list on the header where people can change the language of the website like this English Spanish French Italian German I want to move the German language to a separate domain. I have recently bought the LDT www.domain.de especially for that. QUESTION 1: Can I still mention the german language on the language selector of www.domain.com in order to drive german people (that lands to the English version) to the external domain www.domain.de (maybe with no follow)? Like this: English Spanish French Italian German linked to the external domain www.domain.de QUESTION 2: Can I also mention on www.domain.de the same language selector like this: English linked to www.domain.com Spanish linked to www.domain.com/es/ French linked to www.domain.com/fr/ Italian linked to www.domain.com/it/ I am bit worried because I don’t want to create be interpreted like a reciprocal circle linsk or a kind of link scheme Thank you
Technical SEO | | andromedical0 -
404 page for webshop vs 302 redirect
Hi everybody Im the owner of a webshop and we have implemented that products that are not instock are disabled from the shop. My problem is that i have a lot of 404 pages, that right now get redirected to the front page, when the item are not instock. This is because it would hurt the conversion rate if they got a standard 404 page. Customers dont know what a 404 and would click back and choose another competitor. Its really hard to find out what are the best solution and what are not a downrank at google. This has been running like this for 2 years and cant see any negative in the solution regarding seo and so on, What are your thoughts? Christian Hansen Denmark
Technical SEO | | noerdar0 -
What pages of my site does Google rank as the most important?
If I type site:youtube.com into Google, are the results listed by what Google considers to be the most important pages of the site? If I change my sitemap should this order change? Thanks!
Technical SEO | | Seaward-Group0