Skip to content
    Moz logo Menu open Menu close
    • Products
      • Moz Pro
      • Moz Pro Home
      • Moz Local
      • Moz Local Home
      • STAT
      • Moz API
      • Moz API Home
      • Compare SEO Products
      • Moz Data
    • Free SEO Tools
      • Domain Analysis
      • Keyword Explorer
      • Link Explorer
      • Competitive Research
      • MozBar
      • More Free SEO Tools
    • Learn SEO
      • Beginner's Guide to SEO
      • SEO Learning Center
      • Moz Academy
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • The Moz Story
      • New Releases
    • Log in
    • Log out
    • Products
      • Moz Pro

        Your all-in-one suite of SEO essentials.

      • Moz Local

        Raise your local SEO visibility with complete local SEO management.

      • STAT

        SERP tracking and analytics for enterprise SEO experts.

      • Moz API

        Power your SEO with our index of over 44 trillion links.

      • Compare SEO Products

        See which Moz SEO solution best meets your business needs.

      • Moz Data

        Power your SEO strategy & AI models with custom data solutions.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Free SEO Tools
      • Domain Analysis

        Get top competitive SEO metrics like DA, top pages and more.

      • Keyword Explorer

        Find traffic-driving keywords with our 1.25 billion+ keyword index.

      • Link Explorer

        Explore over 40 trillion links for powerful backlink data.

      • Competitive Research

        Uncover valuable insights on your organic search competitors.

      • MozBar

        See top SEO metrics for free as you browse the web.

      • More Free SEO Tools

        Explore all the free SEO tools Moz has to offer.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Learn SEO
      • Beginner's Guide to SEO

        The #1 most popular introduction to SEO, trusted by millions.

      • SEO Learning Center

        Broaden your knowledge with SEO resources for all skill levels.

      • On-Demand Webinars

        Learn modern SEO best practices from industry experts.

      • How-To Guides

        Step-by-step guides to search success from the authority on SEO.

      • Moz Academy

        Upskill and get certified with on-demand courses & certifications.

      • SEO Q&A

        Insights & discussions from an SEO community of 500,000+.

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Small Business Solutions

        Uncover insights to make smarter marketing decisions in less time.

      • Agency Solutions

        Earn & keep valuable clients with unparalleled data & insights.

      • Enterprise Solutions

        Gain a competitive edge in the ever-changing world of search.

      • The Moz Story

        Moz was the first & remains the most trusted SEO company.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • New Releases

        Get the scoop on the latest and greatest from Moz.

      Surface actionable competitive intel
      New Feature

      Surface actionable competitive intel

      Learn More
    • Log in
      • Moz Pro
      • Moz Local
      • Moz Local Dashboard
      • Moz API
      • Moz API Dashboard
      • Moz Academy
    • Avatar
      • Moz Home
      • Notifications
      • Account & Billing
      • Manage Users
      • Community Profile
      • My Q&A
      • My Videos
      • Log Out

    The Moz Q&A Forum

    • Forum
    • Questions
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. Home
    2. SEO Tactics
    3. Technical SEO
    4. Adding Rel Canonical to multiple pages

    Moz Q&A is closed.

    After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

    Adding Rel Canonical to multiple pages

    Technical SEO
    3
    9
    1720
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with question management privileges can see it.
    • jdossetti
      jdossetti last edited by

      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

      bxySL

      1 Reply Last reply Reply Quote 0
      • Dr-Pete
        Dr-Pete Staff @jdossetti last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • jdossetti
          jdossetti @jdossetti last edited by

          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

          1 Reply Last reply Reply Quote 0
          • Dr-Pete
            Dr-Pete Staff @jdossetti last edited by

            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.

            1 Reply Last reply Reply Quote 1
            • jdossetti
              jdossetti @Dr-Pete last edited by

              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.

              P9ygx

              Dr-Pete jdossetti 3 Replies Last reply Reply Quote 0
              • Dr-Pete
                Dr-Pete Staff last edited by

                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.

                jdossetti 1 Reply Last reply Reply Quote 0
                • rmontanez
                  rmontanez @jdossetti last edited by

                  Following the same concept:

                  1. Create a column (Column E) with the following information "then another column (Column F) with ""/>"
                  2. 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.

                  1 Reply Last reply Reply Quote 1
                  • jdossetti
                    jdossetti @rmontanez last edited by

                    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

                    z7GSL

                    rmontanez 1 Reply Last reply Reply Quote 0
                    • rmontanez
                      rmontanez last edited by

                      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:

                      1. Create three more columns with to duplicate columns B, C, D
                      2. Use the following formula on column B "**=CONCATENATE(A1,B1)" **
                      3. Copy the same formula for columns C & D
                      4. Replace the “B1” in your formula for the respective columns (i.e. Column C should have C1.)
                      5. Copy & Paste the content of columns E, F, G (The copied columns with formulas)  to all the rows.
                      6. Once copied, the information in columns E, F, G should look like the end result that you want.
                      7. 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.

                      jdossetti 1 Reply Last reply Reply Quote 1
                      • 1 / 1
                      • First post
                        Last post

                      Got a burning SEO question?

                      Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                      Start my free trial


                      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.

                      • See all categories

                      Related Questions

                      • O2C

                        Blog Page Titles - Page 1, Page 2 etc.

                        Hi All, I have a couple of crawl errors coming up in MOZ that I am trying to fix. They are duplicate page title issues with my blog area. For example we have a URL of www.ourwebsite.com/blog/page/1 and as we have quite a few blog posts they get put onto another page, example www.ourwebsite.com/blog/page/2 both of these urls have the same heading, title, meta description etc. I was just wondering if this was an actual SEO problem or not and if there is a way to fix it. I am using Wordpress for reference but I can't see anywhere to access the settings of these pages. Thanks

                        Technical SEO | | O2C
                        0
                      • AdenaSEO

                        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...
                        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, Tom

                        Technical SEO | | AdenaSEO
                        1
                      • Nanook1

                        Is it better to use XXX.com or XXX.com/index.html as canonical page

                        Is it better to use 301 redirects or canonical page? I suspect canonical is easier. The question is, which is the best canonical page, YYY.com or YYY.com/indexhtml? I assume YYY.com, since there will be many other pages such as YYY.com/info.html, YYY.com/services.html, etc.

                        Technical SEO | | Nanook1
                        0
                      • GregB123

                        Canonical tag for Home page: with or without / at the end???

                        Setting up canonical tags for an old site. I really need advice on that darn backslash / at the end of the homepage URL. We have incoming links to the homepage as http://www.mysite.com (without the backslash), and as http://www.mysite.com/ (with the backslash), and as http://www.mysite.com/index.html I know that there should be 301 redirects to just one version, but I need to know more about the canonical tags... Which should the canonical tag be??? (without the backslash) or (with the backslash) Thanks for your help! 🙂

                        Technical SEO | | GregB123
                        0
                      • Branden_S

                        Page titles in browser not matching WP page title

                        I have an issue with a few page titles not matching the title I have In WordPress.  I have 2 pages, blog & creative gallery, that show the homepage title, which is causing duplicate title errors.  This has been going on for 5 weeks, so its not an a crawl issue.  Any ideas what could cause this? To clarify, I have the page title set in WP, and I checked "Disable PSP title format on this page/post:"...but this page is still showing the homepage title.  Is there an additional title setting for a page in WP?

                        Technical SEO | | Branden_S
                        0
                      • ShawnHerrick

                        Product Pages Outranking Category Pages

                        Hi, We are noticing an issue where some product pages are outranking our relevant category pages for certain keywords. For a made up example, a "heavy duty widgets" product page might rank for the keyword phrase Heavy Duty Widgets, instead of our Heavy Duty Widgets category page appearing in the SERPs. We've noticed this happening primarily in cases where the name of the product page contains an at least partial match for the desired keyword phrase we want the category page to rank for. However, we've also found isolated cases where the specified keyword points to a completely irrelevent pages instead of the relevant category page. Has anyone encountered a similar issue before, or have any ideas as to what may cause this to happen? Let me know if more clarification of the question is needed. Thanks!

                        Technical SEO | | ShawnHerrick
                        0
                      • JohannCR

                        Internal search : rel=canonical vs noindex vs robots.txt

                        Hi everyone, I have a website with a lot of internal search results pages indexed. I'm not asking if they should be indexed or not, I  know they should not according to Google's guidelines. And they make a bunch of duplicated pages so I want to solve this problem. The thing is, if I noindex them, the site is gonna lose a non-negligible chunk of traffic : nearly 13% according to google analytics !!! I thought of blocking them in robots.txt. This solution would not keep them out of the index. But the pages appearing in GG SERPS would then look empty (no title, no description), thus their CTR would plummet and I would lose a bit of traffic too... The last idea I had was to use a rel=canonical tag pointing to the original search page (that is empty, without results), but it would probably have the same effect as noindexing them, wouldn't it ? (never tried so I'm not sure of this) Of course I did some research on the subject, but each of my finding recommanded one of the 3 methods only ! One even recommanded noindex+robots.txt block which is stupid because the noindex would then be useless... Is there somebody who can tell me which option is the best to keep this traffic ? Thanks a million

                        Technical SEO | | JohannCR
                        0
                      • Firestarter-SEO

                        How to set up a rel canonical in big commmerce?

                        I have no clue how to set this up in the Bigcommerce store platform

                        Technical SEO | | Firestarter-SEO
                        0

                      Get started with Moz Pro!

                      Unlock the power of advanced SEO tools and data-driven insights.

                      Start my free trial
                      Products
                      • Moz Pro
                      • Moz Local
                      • Moz API
                      • Moz Data
                      • STAT
                      • Product Updates
                      Moz Solutions
                      • SMB Solutions
                      • Agency Solutions
                      • Enterprise Solutions
                      Free SEO Tools
                      • Domain Authority Checker
                      • Link Explorer
                      • Keyword Explorer
                      • Competitive Research
                      • Brand Authority Checker
                      • Local Citation Checker
                      • MozBar Extension
                      • MozCast
                      Resources
                      • Blog
                      • SEO Learning Center
                      • Help Hub
                      • Beginner's Guide to SEO
                      • How-to Guides
                      • Moz Academy
                      • API Docs
                      About Moz
                      • About
                      • Team
                      • Careers
                      • Contact
                      Why Moz
                      • Case Studies
                      • Testimonials
                      Get Involved
                      • Become an Affiliate
                      • MozCon
                      • Webinars
                      • Practical Marketer Series
                      • MozPod
                      Connect with us

                      Contact the Help team

                      Join our newsletter
                      Moz logo
                      © 2021 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                      • Accessibility
                      • Terms of Use
                      • Privacy

                      Looks like your connection to Moz was lost, please wait while we try to reconnect.