Canonical redirects
-
Hello,
I have a quick question: I use wordpress for my website. I have a plugin for translating the website in other languages. Thus, I have 2 versions of urls, one with /en, one without (original languale). This has been seen as duplicate content.
I have been advised that the best to do is to use canonical redirect. Should I use it on the general header.php (the only header I can find in the CMS), or should I redirect each page singularly? I believe the second is the best way, but I can't find headers and txt documents for each page in my FTP.
As well I have seen this post, in which is explained that canonical redirects can be done directly in the general header.php http://www.bin-co.com/blog/2009/02/avoid-duplicate-content-use-canonical-url-in-wordpress-fix-plugin/
Is it true? You have any suggestion?
Thanks!Eugenio
-
Thank you Adam,
Very good answer, thats what I needed
Please let me know if I understood good:
Should I replace the /contact.php in the example to my real address /en/contact?
And basically I should put the below condition. Should I write this code for each url i want to redirect? so that it would be like
if /en/contact, then rel="canonical" /contact
else /contact
if /en/about-us, then rel="canonical" /about-us
else /about-us
etc?
-
Since you are using wordpress you won't have individual pages in your FTP. The only way you could edit something into the individual pages would be each posts edit page on the CMS. However, I don't know if doing that would work since its technically beneath the head.
And yes the canonical redirect can be done in the general header, although personally I would load it as a php IF criteria. In other words you add it to the general header but tell it only to load that if i t is on one of these /en pages. That way you don't have the canonical applied to other pages you actually want, or the main page that it is directing too as that would cause an odd loop for the spiders that I doubt they would respond positively too.
Here you can find a quick sample of working with the PHP if page criteria: http://stackoverflow.com/questions/7997016/if-this-page-show-this-else-show-this
Good luck!
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
-
Questions about canonicals
Howdy Moz community, I had a question regarding canonicals. I help a business with their SEO, and they are a service company. They have one physical location, but they serve multiple cities in the state. My question is in regards to canonicals and unique content. I hear that a page with slightly differing content for each page won't matter as much, if most of the content is relevantly the same. This business wants to create service pages for at least 10 other cities they service. The site currently only have pages that are targeting one city location. I was wondering if it was beneficial to use a template to service each city and then put a canonical there to say that it is an identical page to the main city page? Example: our first city was san francisco, we want to create city pages for santa rosa, novato, san jose and etc. If the content for the 2nd, 3rd, 4th, city were the same content as the 1st city, but just had the slight change with the city name would that hurt? Would putting a canonical help this issue, if i alert that it is the same as the 1st page? The reason I want to do this, is because I have been getting concerns from my copywriter that after the 5th city, they can't seem to make the services pages that much different from the first 4 cities, in terms of wording of the content and its structure. I want to know is there a simpler way to target multiple cities for local SEO reasons like geo targeted terms without having to think of a completely new way to write out the same thing for each city service page, as this is very time consuming on my end. Main questions? Will making template service pages, changing the city name to target different geographic locations and putting a canonical tag for the new pages created, and referring back to the main city page going to be effective in terms of me wanting to rank for multiple cities. Will doing this tell google my content is thin or be considered a duplicate? Will this hurt my rankings? Thanks!
Technical SEO | | Ideas-Money-Art0 -
301 Redirect
Hello Moz Community, I have a question regarding 301 redirecting a new domain that contains keywords relevant to my website. However, I do NOT want to change my current domain. My main question is, by just redirecting this new domain to my current website, will those keywords in the new domain help with ranking in anyway? Thanks in advance for any help!
Technical SEO | | WyzeOwl0 -
Redirect effecting ranking?
I manage the SEO for several different regions which are also based on the same site e.g. example.com/au, example.com/us The /us site has pretty good rankings and changes I'm making to the site are having an impact. The /au site has really bad rankings, even though much of the content is the same. (The /uk site is also awful but we had an issue with 4,500 duplicate pages which were only resolved last week). Crawl diagnostics are only showing 1 major error for a 404 response, I'm receiving a domain authority of 43 and A grade page ranking for some of our targeted keywords. I could believe that this isn't necessarily going to get us a top 10 rating but I would have thought we would be in the top 50, especially for branded keywords. Could the lack of ranking be to do with how our domain redirects? If you go to example.com.au you are taken to the home page rather than being redirected to example.com/au. Once you head to an internal page the URL changes to example.com/au/page
Technical SEO | | ahyde0 -
Canonical Advice - ?
Hi everyone, I have a bit of problem with duplicate content on a newly launched site and looking for some advice on which pages to canonicalize. Our legacy site had product "information" pages that now 301 to new product information pages. The reason for the legacy having these pages (instead of pages where you can purchase) is because we used our vendors "cart link", which was an iframe inside the website. So in order to get ranked for these products, we created these pages, that had links to the frame where they could buy. The strategy worked, and we got ranked for our products. Now with the new site, we have those same product information pages, but when you click the link to buy, it goes to a page which now is on our actual site, where you can make the purchase, but this page contains the same basic information, though it looks very different. So my question --- the product "information" pages, are the new 301 homes and are the pages with the rank. The purchase pages are new and have no rank, but are essentially duplicate content. Should I put the canonical link element on the purchase page and tell Google to regard the information pages since those are ranked? It just seems weird to me to direct Google away from the place where people can purchase, however, the purchase pages aren't nearly as "pretty" as the information pages are, and wouldn't be the greatest landing pages. We have an automotive site, and the purchase page you have to enter vehicle information. The information page is nicer, and if the visitor is interested, its just one click to get to that page to buy. What to do here? I am fairly new to Moz, and I couldn't determine whether I am permitted to include an example link from our site of what I am referring to. Is that permitted? Thanks for any help anyone can provide.
Technical SEO | | yogitrout1
Kristin0 -
301 redirect and search engines
How long until 301 redirects get recognized by search engines? I noticed my link on Google isn't forwarding over to my new domain even after the 301 redirect. If I go to the site directly, the 301 redirect works. Anyone know how long it takes for search engines to pick it up? Thanks!
Technical SEO | | timeintopixels0 -
Do I need both canonical meta tags AND 301 redirects?
I implemented a 301 redirect set to the "www" version in the .htaccess (apache server) file and my logs are DOWN 30-40%! I have to be doing something wrong! AddType application/x-httpd-php .html .htm RewriteCond %{HTTP_HOST} ^luckygemstones.com
Technical SEO | | spkcp111
RewriteRule (.*) http://www.luckygemstones.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^./index.htm
RewriteRule ^(.)index.htm$ http://www.luckygemstones.com/$1 [R=301,L] IndexIgnore *
ErrorDocument 404 http://www.luckygemstones.com/page-not-found.htm
ErrorDocument 500 http://www.luckygemstones.com/internal-serv-error.htm
ErrorDocument 403 http://www.luckygemstones.com/forbidden-request.htm
ErrorDocument 401 http://www.luckygemstones.com/not-authorized.htm I've also started adding canoncial META's to EACH page: I'm using HMTL 4.0 loose still--1000's of pages--painful to convert to HTML5 so I left the / off the tag so it would validate. Am I doing something wrong? Thanks, Kathleen0 -
Canonical in head best practice
Hi Is putting a list of canonical no follow links in the head the best practice? From SEO Moz analysis urls of duplicate content was flagged but now I have lots of cononicals in the head of my doc and the code looks untidy see head here : http://carpetflooringsdirect.com/ Is there a cleaner way of doing this? and how do I retest to see if I have fixed? Many thanks Matt
Technical SEO | | Matt-J0 -
How long should you keep 301 redirects?
Hi, Back in 2009 I decided to update an older site from .htm and .shtml to .php. In order to minimize the impact I would go in every month and do a 301 redirect on the .shtml page to the new .php page. So I have many that range from 2009 through 2010. I had left the old 301's because I felt they would only be used if needed but I would think I should clean up my .htaccess by removing the old 301 redirects if they are not needed. How long should you keep this type of 301 redirect? Thanks!
Technical SEO | | Force70