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
-
Anything wrong in linking to homepage from all sub domain pages?
Hi, We have 6 sub domains which are forums, guides, etc. They have their own visitors for the related queries. We are planning to divert some of them to the website to promote our product with latest content. We are planning to add a link from every page of sub domain to our website homepage. This makes additional thousands of internal links flowing to website homepage. Will this kind of internal linking structure hurts? Any risks involved? Thanks
Web Design | | vtmoz1 -
Internally linked pages from different subdomain must be well optimised?
Hi all, We have guide/help pages from different subdomain (help.website.com). And we have linked these from 3rd hierarchy level pages of our website (website.com/folder1/topic2). But help.website sumdomain & pages are not well optimised. So, I am not sure linking these subdomain pages from our website pages hurts our rankings? Thanks,
Web Design | | vtmoz0 -
How do you optimize for online catalog PDFs in regards to Page load time?
Does anyone have any experience with online widgets or apps that can support catalog pdfs? We have tons of catalog PDFs on one page for the website and the more we add, the worse the page load time gets. Any thoughts would be appreciated. Cheers!
Web Design | | FullMedia900 -
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 -
Traffic flow going through homepage, /default.aspx, and /index.htm - How do I fix this?
In the Google Analytics visitor flow section, most of my traffic is starting off on the homepage, but a significant portion somehow is being directed to /default.aspx, as well as a minor fraction at /index.htm - see the attached image for what this looks like. My questions are, why is this happening, is it negatively affecting the site, and should I just fix it through a filter in Analytics or consult IT? Navigating to the /default.aspx page in the address bar simply returns a blank screen. Any idea of what's going on here? The logo in the top left corner of the site directs to /index.htm, so I think I have that issue solved, but /default.aspx is definitely stumping me. The server currently runs on Apache, though I don't know if it always did. My standard method of simply Googling the problem didn't give me any definitive answers, so any help would be greatly appreciated. Q12QqpC.jpg
Web Design | | BD690 -
Is the 'too many links' caused by the tags?
Hello Just got my seomoz report and decided I better start takiling things. Got a lot of 'too many links' on the report. I don't have control over website design and before I talk to designer I thought I should have a bit of an handle on what I am talking about. I've taken one page that has 483 links. Is this caused by the tags box and would it be a good idea to have it removed? http://commonwealthcontractors.com/uk-visas/tier-2-general-visas-formerly-uk-work-permits/ Regards Niamh
Web Design | | Niamh20 -
Home page redirect - will this cause an SEO problem
Hello, We are using Wordpress to build a wiki site. The wiki plugin we're using (Wordpress Wiki lite) can only be set up on an internal page like nlpwiki(dot)org/wiki Can we redirect the home page to the /wiki subdirectory and use nlpwiki(dot)org/wiki as our home page? I've never done that, just wondering if it will be indexed as the home page or if there are any connonical issues. Thanks!
Web Design | | BobGW0 -
Do you think it will be a good idea to delete old blog pages off the server
I paid somebody to build my website using Dreamweaver, and at one point I didn't know how to use the template which automatically updates every page in the menu section so I stupidly broke the template on every new page when I made the websites blog and put the pages into a subfolder. I realised this was a silly thing to do and now and I now know how to use the template correctly I've copied every single page over from the subfolder and put it into the main template. Now I can update the template menu and every page changes automatically. The only problem is I've now got two versions of every page of my blog on the website. For some reason when I do a sitemap it comes up with a links to the old blog pages I, don't know why when I've removed the links from the blog page? and also the new copies also. I have basically got a copys of all blog pages. Do you think it will be a good idea to delete old indexed blog pages off the server so that when Google spiders the site it will pick up only the new links to the copy pages?
Web Design | | whitbycottages0