How to Add canonical tags on .ASPX pages?
-
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?
-
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.
-
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.
-
Yes that is the correct code for apache sites, but asp sites don't have a section.
-
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.
-
Correct me if I'm wrong but isn't it only to add:
rel="canonical" href="URL" />
in the header?
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
-
Okay to have additional attributes in canonical tag?
Hello! I'm helping a Client with a platform migration from an SEO standpoint. They are working to implement canonical tags, but I've noticed that each of the ones they are implementing are including a "data-rdm" attribute: data-rdm=""> I'm not sure the Client has a way to suppress this before the launch date. Do we think this will be an issue for Google?
Web Design | | PattyAMG1 -
Dedicated landing pages vs responsive web design
I've been doing some research into web design and page layout as my company is considering a re-design. However, we have come to an argument around responsive webdesign vs SEO. The argument is around me (SEO specialist) arguing that I want dedicated pages for all my content as it's good for SEO since it focuses keywords and content properly, and it still adheres to good user journeys (providing it's done correctly), and my web designer arguing that mobile traffic is on the rise (which it is I know) so we should have more content under 1 URL and use responsive web design so that users can just scroll through content instead of having to keep be direct to different pages. What do I do... I can't find any blogs, questions, or whiteboards that really touches on this topic, so can anyone advise me on whether I should: Create dedicated landing pages for each bit of content which is good for SEO and taking users on a journey around my site OR All content that is relative to a landing page, put all under that one URL (e.g. "About us" may have info on the company, our team, our history, careers) and allow people to scroll down what could be a very long page on any device, but may effect SEO as I can't focus keywords/content under one URL properly, so it may effect rankings. Any advice SEO and user experience whizzes out there?
Web Design | | blackboxideas0 -
Our on page blog is off page! What?
Hi Moz Community, I have a customer who has a blog that is FULL of great unique content however the blog resides at a URL that differs from the main site. Eg. blog.mywebsite.com Instead of www.mywebsite.com/blog . With the latest Google updates I fear that this may be hurting our web ranking. In addition the web blog is a carbon copy of the main URL. My Question: I am going to schedule a meeting with the web designers, How vociferously should I argue for having them move the blog onsite and write 301 redirects for the current blog site?
Web Design | | CKerr0 -
How to make sure category pages rank higher than product pages?
Hi, This question is E-Commerce related. We have product categories dividing products by color. Let's say we have the category 'blue toy cars' and a product called 'blue toy car racer', both of these could rank for the keyword 'blue toy car'. How do we make sure the category 'blue toy cars' ranks above the product 'blue toy car racer'? Or is the category page automatically ranked higher because of the higher page authority of that page? Alex
Web Design | | WebmasterAlex0 -
Site structure- category pages
Hi, I'm relatively new to SEO but have tried to apply all best practices to my site. However, I've hit a stumbling block when it comes to whether or not to index my category pages. http://istudyenglishonline.com/category/expressions-idioms/ General info: the site has been created with Wordpress and has a directory of English idioms. Each idiom is associated with one or more categories that it falls under (emotions, sports, food etc). Each category has its own page where the list of idioms will be. As each idiom often has more than one associated category, the same idiom will appear in different category pages, thus creating duplicate content. However, I have given each category page its own unique description. The issue is, when there are numerous idioms, the category page will have more than 1 page. I don't have the ability to create a unique description for each subsequent page of the main category. I know that the very model for some vertical search engines (such as indeed.com) is to create such landing pages and that the more "categories" that they have assigned to their job ads, in this case, the more pages created and the more pages indexed in Google. This seems to work very well for them. My question is, am I doing things right? Should I be doing anything to the subsequent category pages to avoid duplicate content? My plan was to have so many idioms associated with so many categories that I have a fair number of landing pages indexed in google, thus attacking the long tail keywords. However, I'm not sure if I am going the right way. Any advice would be much appreciated!
Web Design | | villarroel0 -
How serious is duplicate page content?
We just launched our site on a new platform - Magento Enterprise. We have a wholesale catalog and and retail catalog. We have up to 3 domains pointing to each product. We are getting tons of duplicate content errors. What are the best practices for dealing with this? Here is an example: mysite.com/product.html mysite.com/category/product.html mysite.com/dynamic-url
Web Design | | devonkrusich0 -
Home Page Optimization
I only discovered SEOmoz about a week ago and my knowledge in this area has grown 500% in that time, but I'm still a newbie. I'm looking for whether I have the right general idea or not with my home page in regards to SEO. The page is located at Line.com. The top section with the images is 100% for humans. The next section is where the SEO comes into play. I have 5 different services [sports monitor, free sports betting, sports betting forum, sports handicapper websites, gambling affiliate program] that I offer on 5 different inner pages. What I'm trying to do is have my home page rank decently for my desired terms and then pass link juice to the respective pages. My goal is to eventually have my inner pages rank higher than my home page for my desired search terms. Do I have the right general idea or am I way off? Is this too much for the search engines with all of the links and bold text? Design criticisms are also welcome, and anybody who wants to critique the inner pages would be forever thanked. Feel free to be as harsh as you want as long as it's constructive. Thanks!
Web Design | | PatrickGriffith0 -
Mobile Site Pages: Word Count Help
Hi there I am doing a mobile website for a client and they asked me what the dieal word count would be per page. They are SEO conciosu but we are not doing SEO on this site. I would just like to know a general rule of thumb. Regards Stef
Web Design | | stefanok0