So basically I have a site where occasionally I setup a "vanity" url for web campaigns or product literature:
links to the same page as
I set this up with a rewrite in IIS7, and as such, it's difficult to grab the real URL from the underlying ASP.NET code since Context.Request.Url returns the rewritten URL instead of the URL the user visited. This makes it difficult to inject the
<link rel="canonical" tag into the page at render time.
<link rel="canonical" tag that way.
Honestly, I don't think it ultimately will make much of a difference since the preferred URL is already submitted through the Google Sitemap, but since I have some SEO folks that are demanding it, I'm wondering if this will be picked up by Google or if I'm just wasting my time adding that code.
It's easier to make sure that the rel=canonical is in the template. Make sure it goes onto all of the pages, including the original. That way if it's caught on only one and Google sees duplicate content, you won't eat a penalty. There appears to be a smart filter that will attempt to file duplicates together if even one of them has a working canonical link. Again, however, it's not something to rely on!
- → How do you install an SSL certificate on IIS 6 and 7?
- → How to assign a SSL Certificate to IIS7 Site from Command Prompt
- → How do i connect a VS2008 MVC project to Vista IIS7 localhost as the web server?
- → URL Rewrite Module for IIS 7
- → What cookie does a .NET ADFS claims aware web application return to the client browser on receipt of a valid token?
- → Wordpress on Microsoft-IIS/7.5 Server: Only Home Page works
- → Can I redirect www.abc.com/a b c/test.html to www.abc.com/a-b-c/test.html with MVC3
- → How to debug "An unhandled exception occurred and the process was terminated" error
- → How do I get PHP and MySQL working on IIS 7.0?
- → How to configure IIS7 to allow zip file uploads using classic asp?
- → 'JQuery' is undefined
- → Looks like you forgot to register the http module with Windsor Castle with IIS7