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
-
Internal linking: Repeating same low level pages from high hierarchy level pages
Hi all, We have 3 editions of our product we are trying to rank better. Some of our features level pages from these editions are repeating in these 3 editions. Exactly like below example: clothes.com/cotton-fabrics/shirts clothes.com/wool-fabrics/shirts clothes.com/polyester-fabrics/shirts "Shirts" pages repeat in "cotton-fabrics", "wool-fabrics" and "polyester-fabrics". We have added rel=canonical to rank "shirts" in rank only one category. I wonder do we need to take any other measures to make sure that these pages don't affect us negatively. Thanks
Web Design | | vtmoz0 -
Problems preventing Wordpress attachment pages from being indexed and from being seen as duplicate content.
Hi According to a Moz Crawl, it looks like the Wordpress attachment pages from all image uploads are being indexed and seen as duplicate content..or..is it the Yoast sitemap causing it? I see 2 options in SEO Yoast: Redirect attachment URLs to parent post URL. Media...Meta Robots: noindex, follow I set it to (1) initially which didn't resolve the problem. Then I set it to option (2) so that all images won't be indexed but search engines would still associate those images with their relevant posts and pages. However, I understand what both of these options (1) and (2) mean, but because I chose option 2, will that mean all of the images on the website won't stand a chance of being indexed in search engines and Google Images etc? As far as duplicate content goes, search engines can get confused and there are 2 ways for search engines
Web Design | | SEOguy1
to reach the correct page content destination. But when eg Google makes the wrong choice a portion of traffic drops off (is lost hence errors) which then leaves the searcher frustrated, and this affects the seo and ranking of the site which worsens with time. My goal here is - I would like all of the web images to be indexed by Google, and for all of the image attachment pages to not be indexed at all (Moz shows the image attachment pages as duplicates and the referring site causing this is the sitemap url which Yoast creates) ; that sitemap url has been submitted to the search engines already and I will resubmit once I can resolve the attachment pages issues.. Please can you advise. Thanks.0 -
Joomla Core Pages Delisted
Hey Everyone, This query may be more for a Joomla developer or someone that has had a similar issue. I'm not really looking for answers like, "check Google Search Console" or anything like that. We have a client who recently had all of their core pages delisted in Google but the blog is still being displayed in search results. For example, if you search "company name" they have a blog post that ranks #13 or so organically. I tested Google Search Console and Google is saying that the site is temporarily unavailable. We haven't made any changes or updates to Joomla's core structure so I'm unsure as to where this change is coming from. Here are some items we've checked: 1. Site searches within Google, resulted in seeing core pages are not indexed but blog pages are 2. Google Search Console - looked for manual actions (none found), looked at sitemap errors (nothing mentioned), looked at robots.txt (no issues here), attempted to fetch the site as Google (temporarily unavailable). 3. Called the hosting company (Rackspace) to discuss potential issues. They were extremely helpful but we were unable to find anything. The blog is actually a Module that was added so I'm thinking something has changed to block Google bots from the core Joomla structure but it hasn't blocked them from the blog structure. Without putting the company name or url on blast, has anyone heard of or experienced anything like this? Any help or insights would be much appreciated!
Web Design | | Leadhub0 -
Website Home page suddenly disappeared after changing Hosting
HI All, My site was ranking very well and was in 1st page of google for most of my keywords. Last week we did some update to the site and moved it to new hosting and from then onwards I dont see my site home page in Google ranking . My Website Name is : royalevents.com.au. We used to be in 1st of Google for keywords like wedding Mandaps, Indian Wedding Mandaps etc, Would be great if some one helps us to figure out whats gone wrong .. I also did Webmaster Fetch as Google but nothing happened. Thanks
Web Design | | Verve-Innovation0 -
Will changing product from Grouped to Simple on my magento category page affect my SEO?
Hi all, A category page on my site http://www.porcelainsuperstore.co.uk/wood-effect.html currently ranks number 3 on Google for the keyword "Wood Effect Tiles" We're currently reorganising some of our product and I would like to know if this is going to affect the SEO and ranking for the above page and keyword. The majority of products on that page are magento grouped products. I would like to change the page so that it displays only the different constituent simple products rather than the grouped products on the category page. My question is, will this have any impact on SEO? I intend on leaving all other data on the category page the same - so the metadata and the description/title etc. Any help/comments would be much appreciated! Ben
Web Design | | piazza0 -
Mobile tab for page speed insight
I am getting mobile error occurred problem.Can somebody help me about this issue? https://developers.google.com/speed/pagespeed/insights/?hl=en&utm_source=wmx&utm_campaign=wmx_otherlinks&url=www.printez.com&tab=mobile Morris
Web Design | | PrintEZ0 -
How to create this image effect for my home page
How do I make a wide, somewhat fast loading image effect like this home page has: 3dcart.com work on my website bobweikel.com I'm asking for how to create the effect (with small enough image kb to load) and what the image should be of in your opinion. Thanks!
Web Design | | BobGW0 -
Auto-Generated META tag on 404 Page
I'm currently creating a 404 error page for my site and I noticed that a similar site uses some sort of code to automatically generate a meta title. Is this useful? For instance type in electrolux.com/john This page does not exist but in the title you'll see John | Electrolux How can i do this on my site?
Web Design | | evacuumstoreSEO0