• majorAlexa

        See all notifications

        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
          • MozCon
          • Webinars, Whitepapers, & Guides
        • Blog
        • Why Moz
          • Digital Marketers
          • Agency Solutions
          • Enterprise Solutions
          • Small Business Solutions
          • 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.

          Let your business shine with Listings AI
          Moz Local

          Let your business shine with Listings AI

          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.

          • MozCon

            Save on Early Bird tickets and join us in London or New York City

          Unlock flexible pricing & new endpoints
          Moz API

          Unlock flexible pricing & new endpoints

          Find your plan
        • Blog
        • Why Moz
          • Digital Marketers

            Simplify SEO tasks to save time and grow your traffic.

          • 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.

          • 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
        • My Q&A
        • 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
        • Watching

          Notify me of new replies.
          Show question in unread.

        • Not Watching

          Do not notify me of new replies.
          Show question in unread if category is not ignored.

        • Ignoring

          Do not notify me of new replies.
          Do not show question in unread.

        • Oldest to Newest
        • Newest to Oldest
        • Most Votes
        Reply
        • Reply as question
        Locked
        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

                          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

                          • BrianAlpert78

                            Does a no-indexed parent page impact its child pages?

                            If I have a page* in WordPress that is set as private and is no-indexed with Yoast, will that negatively affect the visibility of other pages that are set as children of that first page? *The context is that I want to organize some of the pages on a business's WordPress site into silos/directories. For example, if the business was a home remodeling company, it'd be convenient to keep all the pages about bathrooms, kitchens, additions, basements, etc. bundled together under a "services" parent page (/services/kitchens/, /services/bathrooms/, etc.). The thing is that the child pages will all be directly accessible from the menus, so there doesn't need to be anything on the parent /services/ page itself. Another such parent page/directory/category might be used to keep different photo gallery pages together (/galleries/kitchen-photos/, /galleries/bathroom-photos/, etc.). So again, would it be safe for pages like /services/kitchens/ and /galleries/addition-photos/ if the /services/ and /galleries/ pages (but not /galleries/* or anything like that) are no-indexed? Thanks!

                            Technical SEO | | BrianAlpert78
                            1
                          • znotes

                            Do you need a canonical tag for search and filter pages?

                            Hi Moz Community, We've been implementing new canonical tags for our category pages but I have a question about pages that are found via search and our filtering options. Would we still need a canonical tag for pages that show up in search + a filter option if it only lists one page of items? Example below. www.uncommongoods.com/search.html/find/?q=dog&exclusive=1 Thanks!

                            Technical SEO | | znotes
                            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
                          • SOtBOrlando

                            how to set rel canonical on wordpress.com sites

                            I know how to do this with a wordpress.org site but I have a client that does not want to switch and without a plugin I am lost. any help would be greatly appreciated. Jeremy Wood

                            Technical SEO | | SOtBOrlando
                            0
                          • AlexSG

                            Rel canonical between mirrored domains

                            Hi all & happy new near! I'm new to SEO and could do with a spot of advice: I have a site that has several domains that mirror it (not good, I know...)  So www.site.com, www.site.edu.sg, www.othersite.com all serve up the same content.  I was planning to use rel="canonical" to avoid the duplication but I have a concern: Currently several of these mirrors rank - one, the .com ranks #1 on local google search for some useful keywords. the .edu.sg also shows up as #9 for a dirrerent page. In some cases I have multiple mirrors showing up on a specific serp. I would LIKE to rel canonical everything to the local edu.sg domain since this is most representative of the fact that the site is for a school in Singapore but...
                            -The .com is listed in DMOZ (this used to be important) and none of the volunteers there ever respoded to requests to update it to the .edu.sg
                            -The .com ranks higher than the com.sg page for non-local search so I am guessing google has some kind of algorithm to mark down obviosly local domains in other geographic locations Any opinions on this? Should I rel canonical the .com to the .edu.sg or vice versa? I appreciate any advice or opinion before I pull the trigger and end up shooting myself in the foot! Best regards from Singapore!

                            Technical SEO | | AlexSG
                            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
                          • Leighm

                            Should there be a canonical tag on my 404 error page?

                            In my crawl diagnostics, I notice some 4xx client errors. They are appearing for pages that no longer exist, so I'm not sure what the problem is. Shouldn't they just be dealt as 404's? Anyway, on closer inspection I noticed that my 404 error page contains a canonical tag which points to the missing page. Could this be the issue? Is it a good idea to remove the canonical tag from this error page? Thanks.

                            Technical SEO | | Leighm
                            0
                          • DavidS-282061

                            Are .html pages better for ranking than .asp pages

                            It seems that .html pages do better for the long tail...

                            Technical SEO | | DavidS-282061
                            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
                          • Digital Marketers
                          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.