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. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Web Design
    4. How to Add canonical tags on .ASPX pages?

    How to Add canonical tags on .ASPX pages?

    Web Design
    6 4 3.7k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Ryan-Bradley
      Ryan-Bradley last edited by

      What is the proper way (or is it possible) to add canonical tags on website pages that end in .aspx?

      If you add a canonical tag to the Master Page it will put that exact canonical tag on every page, which is bad.

      Is there a different version of the tag to put on individual pages?

      And one to put on the home page without the Master Page error?

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

        Correct me if I'm wrong but isn't it only to add:

        rel="canonical" href="URL" />

        in the header?

        Ryan-Bradley 1 Reply Last reply Reply Quote 0
        • john4math
          john4math last edited by

          The extensions of the pages won't matter, provided you're able to actually put the canonical tag itself within the of the page.  If you put in the , it'll be ignored.

          You only need to put the canonical tag on pages that are duplicates of other pages.  You'll need to be able to specify the correct href for the canonical tag for each page, which is the full URL of the page it's a duplicate of.  If you only have that level of control to place this only on the duplicate pages, you are still ok, as you can have a page rel=canonical to itself (according to Matt Cutts here).  So if all the duplicate URLs and the original URL all rel=canonical to the original page, it should work.  If you don't even have that level of control, you might not be able to use the canonical tag.  I hope that's what you mean by "Master Page"... if you have each master page rel=canonical to itself, it sounds like it could solve this for you.

          FYI, if you can 301 redirect these duplicate pages to the original page, that's the preferred method of resolving duplicate content issues.

          Ryan-Bradley 1 Reply Last reply Reply Quote 0
          • Ryan-Bradley
            Ryan-Bradley @mozalbin last edited by

            Yes that is the correct code for apache sites, but asp sites don't have a section.

            1 Reply Last reply Reply Quote 0
            • Ryan-Bradley
              Ryan-Bradley @john4math last edited by

              The Master Page is the main template page that all of the asp pages on the site are based on.  If I put a standard canonical url tag in the Master Page, that canonical url will then be on all of the pages.

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

                Put a asp:placeholder or asp:literal in masterpage. When you want to have a canonical-tag from an inheriting page, just give placeholder / literal value.

                1 Reply Last reply Reply Quote 1
                • 1 / 1
                • First post
                  Last post
                • When rel canonical tag used, which page does Google considers for ranking and indexing? A/B test scenario!
                  0
                  1
                  45

                • H Tags for an Events Page
                  Linda-Vassily
                  Linda-Vassily
                  0
                  3
                  150

                • rel="canonical" Tags Mistake
                  jesse-landry
                  jesse-landry
                  0
                  5
                  222

                • Other tags inside an H1 tag
                  jonmifsud
                  jonmifsud
                  1
                  4
                  32.6k

                • Rel Canonical tag usage on ECommerce website
                  Blenny
                  Blenny
                  0
                  8
                  1.7k

                • Auto-Generated META tag on 404 Page
                  MarieHaynes
                  MarieHaynes
                  0
                  3
                  2.1k

                • Are slimmed down mobile versions of a canonical page considered cloaking?
                  RyanOD
                  RyanOD
                  0
                  4
                  1.0k

                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 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                • Accessibility
                • Terms of Use
                • Privacy