how to add cannonical tag for ASPX .NET page
How could I set a cannonical tag for .NET (aspx) web pages that use master pages?
based on the SEO test, our site fails on the canonical test. we are using a 3rd party hoster (win server) and don't have access to root server!
I added the following snippet to my domain.com/default.aspx page
HtmlLink seoTag = new HtmlLink(); seoTag.Attributes.Add("rel", "canonical"); seoTag.Href = "http://www.domain.com/"; Header.Controls.Add(seoTag);
but that didn't help!
Appreciate your feedback.
Try to add this in the aspx (html code)
<link rel=”canonical” href=”http://example.com/page.html”/>
- → Function Undefined in Axios promise
- → React formatting dates with momentjs server side
- → AngularJS directive: "templateUrl" doesn't work while "template" works
- → how to add cannonical tag for ASPX .NET page
- → URL routing requires /Home/Page?page=1 instead of /Home/Page/1
- → ASP.NET routing w/ changing article name
- → NumericTextBox Loses Value using Html.TextBoxFor, not HTML
- → How to do Bundling of css & js files in Drupal
- → Does the fact that every page is reachable through www.example.com and www.example.com/index have any SEO impact?
- → How to add rich snippet in a website?
- → UrlRewriting does not work on server, but on localhost it works fine on asp.net?
- → Bootstrap Nav Collapse via Data Attributes Not Working