Adding Rel Canonical to multiple pages
-
Hi,
Our CMS generates a lot of duplicate content, (Different versions of every page for 3 different font sizes). There are many other reasons why we should drop this current CMS and go with something else, and we are in the process of doing that. But for now, does anyone know how would I do the following:
I've created a spreadsheet that contains the following:
Column 1: rel="canonical" tag for URL
Column 2: Duplicate Content URL # 1
Column 3: Duplicate Content URL # 2
Column 4: Duplicate Content URL # 3
I want to add the tag from column 1 into the head of every page from column 2,3, and 4.
What would be a fast way to do this considering that I have around 1800 rows.
Check the screenshot of the builtwith.com result to see more information about the website if that helps.
Farris
-
Yeah, wish I could give you a simpler answer, but I'm afraid it might end up being a little tricky. Hit the biggest problems first, and at least you can manage time/money a bit. The one bright side is that the rules should be no harder to code in ColdFusion than anything else (PHP, ASP, whatever). It's just the core logic that's tricky.
-
That's what I thought. I need to find someone in the company who knows cold fusion and go through it.
Thanks for your help though. I appreciate it.
Farris
-
Unfortunately, the rules may differ from page to page and will be entirely dependent on how your pages are generated. If it's just a matter of the "index.cfm" version vs. root ("/") versions of pages, those canonical should be straightforward. For the other parameters, though (like "i", "fs", etc.), it depends entirely on the function of those parameters.
I know ColdFusion reasonably well, and even given that, I couldn't give you a one-size-fits-all rule that would solve the problem. It really has to be guided by your site structure and code/data logic. Personally, I'd start with the pattern that generates the most problems and solve that one first. In other words, if one template (like "/press-releases") generates dozens or hundreds of duplicates, deal with that first. If you solve the top 3-4 problems, you may clean up quite a bit. That could be more effective than trying to fix everything at once.
-
Here's a spreadsheet sample. I did what Roberto suggested. I have a column with the ready for every duplicate content URL.
The site is dynamic. That was the main problem I was facing, I'm not sure how to set the canonicals on each page without having to go into the html and copy the tag from the spreadsheet to the manually.
I added the screenshot of builtwith.com in the main question hoping it would give anyone insight as to how I would code rules to set the canonicals.
-
Could you provide an approximate example that matches your real situation (a fake domain is fine, but with the same basic format)? This is a situation where fake examples that don't match the real situation probably won't help us (or you) much.
Once you have the spreadsheet, how are you going to translate that into tags? If this is a dynamic site, it would be better to be able to code rules to set the canonicals - and potentially much easier.
-
Following the same concept:
- Create a column (Column E) with the following information "then another column (Column F) with ""/>"
- In column G enter the following formula: =CONCATENATE(E1,Cell of Duplicate URL, F3).
The end result will have Column A with the Domain in it. Follow steps 6 & 7 to complete the process.
Feel free to send me a sample spreadsheet with some info and I can set it up for you.
-
Roberto, Thank you for your answer. I just realized that I was unclear when I asked the question. I already have the link containing the canonical tag for each of the URLs ready. That is what column A already contains. I need to add that into the section of the pages in column 2,3, and 4. I'm just unsure how to do this for 1800 rows each containing the correct URL in column A, and in column 2,3, and 4 the URLs of the duplicate content pages that need the link added to the section. Check the image below to see what I mean. I appreciate the effort though Farris
-
Farris,
This is the way I would do it.
You have the following columns created:
- Column A: "canonical" tag for UR
- Column B: Duplicate Content URL # 1
- Column Duplicate Content URL # 2
- Column Duplicate Content URL # 1
Follow the next steps:
- Create three more columns with to duplicate columns B, C, D
- Use the following formula on column B "**=CONCATENATE(A1,B1)" **
- Copy the same formula for columns C & D
- Replace the “B1” in your formula for the respective columns (i.e. Column C should have C1.)
- Copy & Paste the content of columns E, F, G (The copied columns with formulas) to all the rows.
- Once copied, the information in columns E, F, G should look like the end result that you want.
- if data is correct, copy columns E, F, G and paste in the same location but use Paste Special and paste values only. This will remove your formulas.
I hope this helps.
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
-
NoIndex tag, canonical tag or automatically generated H1's for automatically generated enquiry pages?
What would be better for automatically generated accommodation enquiry pages for a travel company? NoIndex tag, canonical tag, automatically generated H1's or another solution? This is the homepage: https://www.discoverqueensland.com.au/ You would enquire from a page like this: https://www.discoverqueensland.com.au/accommodation/sunshine-coast/twin-waters/the-sebel-twin-waters This is the enquiry form: https://www.discoverqueensland.com.au/accommodation-enquiry.php?name=The+Sebel+Twin+Waters®ion_name=Sunshine+Coast
Technical SEO | | Kim_Lazaro0 -
How do I prevent duplicate page title errors from being generated by my multiple shop pages?
Our e-commerce shop has numerous pages within the main shop page. Users navigate through the shop via typical pagination. So while there may be 6 pages of products it's all still under the main shop page. Moz keeps flagging my shop pages as having duplicate titles (ie shop page 2). But they're all the same page. Users aren't loading unique pages each time they go to the next page of products and they aren't pages I can edit. I'm not sure how to prevent this issue from popping up on my reports.
Technical SEO | | NiteSkirm0 -
Rel=canonical or 301 to pass on page authority/juice
I have a large body of product support documentation and there are similar pages for each of versions of the product, with minor changes as the product changes. The two oldest versions of this documentation get the best ranking and are powering Google snippets--however, this content is out of date. The team responsible for the support documentation wants current pages to rank higher. I suggested 301 redirects but they want to maintain the old page content for clients still using the older version of the product. Is there a way to move a page's power to a more updated version of the page, but without wiping out the old content? Considering recommending canonical tags, but I'm not sure this will get me all the way there either as there are some differences between pages, especially as the product has changed over time. Thoughts?
Technical SEO | | rachelholdgrafer0 -
Link rel="prev" AND canonical
Hi guys, When you have several tabs on your website with products, you can most likely navigate to page 2, 3, 4 etc...
Technical SEO | | AdenaSEO
You can add the link rel="prev" and link rel="next" tags to make sure that 1 page get's indexed / ranked by Google. am I correct? However this still means that all the pages can get indexed, right? For example a webshop makes use of the link rel="prev" and ="next" tags. In the Google results page though, all the seperate tabs pages are still visible/indexed..
http://www.domain.nl/watches/?tab=1
http://www.domain.nl/watches/?tab=24
http://www.domain.nl/watches/?tab=19
etc..... Can we prevent this, and make sure only the main page get's indexed and ranked, by adding a canonical link on every 'tab page' to the main page --> www.domain.nl/watches/ I hope I explained it well and I'm looking forward to hearing from you. Regards, Tom1 -
Site splitting value of our pages with multiple variations. How can I fix this with the least impact?
Just started at a company recently, and there is a preexisting problem that I could use some help with. Somebody please tell me there is a low impact fix for this: My company's website is structured so all of the main links used on the nav are listed as .asp pages. All the canonical stuff. However, for "SEO Purposes," we have a number of similar (not exact) pages in .html on the same topic on our site. So, for example, let's say we're a bakery. The main URL, as linked in the nav, for our Chocolate Cakes, would be http://www.oursite.com/chocolate-cakes.asp. This differentiates the page from our other cake varieties, such as http://www.oursite.com/pound-cakes.asp and http://www.oursite.com/carrot-cakes.asp. Alas, fully indexed in Google with links existing only in our sitemap, we also have: http://www.oursite.com/chocolate-cakes.html http://www.oursite.com/chocolatecakes.html http://www.oursite.com/cakes-chocolate.html This seems CRAZY to me, because wouldn't this split our search results 4 ways? Am I right in assuming this is destroying the rankings of our canonical pages? I want to change this, but problem is, none of the content is the same on any of the variants, and some of these pages rank really well - albeit mostly for long tail keywords instead of the good, solid keywords we're after. So, what I'm asking you guys is: How do I burn these .html pages to the ground without completely destroying our rankings for the other keywords? I want to 301 those pages to our canonical nav URLs but, because of the wildly different content, I'm afraid that we could see a heavy drop in search traffic. Am I just being overly cautious? Thanks in advance!
Technical SEO | | jdsnyc20 -
Rel Canonical ? please help again!
Hi, I have been looking at the on page section and the grading. And I have noticed on nearly all of my pages an error. No More Than One Canonical URL Tag Moderate fix <dl> <dt>Number of Canonical tags</dt> <dd>2</dd> <dt>Explanation</dt> <dd>The canonical URL tag is meant to be employed only a single time on an individual URL (much like the title element or meta description). To ensure the search engines properly parse the canonical source, employ only a single version of this tag.</dd> <dt>Recommendation</dt> <dd>Remove all but a single canonical URL tag</dd> </dl> <a class="more expanded">Minimize</a> Please how do I make sure these canonicals are working properly, My rankings are getting worst fro long tail and short tail keywords. I am not even ranking for the main keywords "Probate" at all now! Our site is probate, we sell probate, we talk aout probate and now we are out of the top 200??? http://www.finalduties.co.uk Kind Regards Elissa HAyes
Technical SEO | | Chris__Chris0 -
Multiple H1 tags on same page
Hi Mozers I have a doubt regarding H1 tags. I know H1 tags will not give some special SEO value. But is there any issue if we are using multiple H1 tags on a same page? For example on the seomoz.org blog home page I saw 16 H1 tags (seomoz.org/blog). Is that ok to use like that? Can I completely ignore all my worries about H1 tags?
Technical SEO | | riyas_heych0 -
Rel="canonical" for PFDs?
Hello there, We have a lot of PDFs that seem to end up on other websites. I was wondering if there was a way to make sure that our website gets the credit/authority as the original creator. Besides linking directly from the PDF copy to our pages, is anyone aware of strategy for letting Google know that we are the original publishers? I know search engines can index HTML versions of PDFs, so is there anyway to get them to index a rel="canonical" tag as well? Thoughts/Ideas?
Technical SEO | | Tektronix0