Canonical rewrite
16 January 2012
How should pages display canonical information?
I’ve been searching for a resolution to this for a while now, and have only today come across the solution.
Until today, I’ve been adding the following meta tag:
As this seemed to satisfy the SEO Tools I’ve been using recently, I’ve been happily adding it to the header on my websites.
But today I came across a new SEO Tool website which still had problems choosing which version of the site was most important. Now I’m not saying the above meta tag is wrong – and it may be all you need. But in the long run the following solution is so much neater. It involves adding the following code within .htaccess on the server. (Sorry if you’re using anything other than a Unix type server!)
Options +FollowSymLinks
RewriteEngine on
RewriteCond % ^example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]
What it does is to rewrite the URL, adding www. to it. It’s beautiful. It works. I love it. And what I was looking for all the time.
About the author
Articles within category
- Want to make a web developer cringe ? Say TEMPLATE
- Your iPad. What is it For?
- Choosing an appropriate domain name
- Mobile websites: Over-rated or opportunity?
- Dot Com Infoway: A Breakthrough In IPhone Gaming App
- Prerequisite Towards The BlackBerry Acquiring More Favored
- The Usefulness Of Each Iphone Entertainment App
- The Importance Of Hiring A Software Development Company
- Iphone Ebook App Developer
- Mobile App Marketing: Simple Tips to Market Your Mobile App
- Web Application Development: An Emerging Technology
- Community Website Solutions
- HTML5 Breaking the Barriers for Developers
- Ecommerce Website Development Strategies
- Advanced Ruby on Rails Development for Web 2.0
- All About The Android app developer
- Tips to Make a Successful App
- The Importance of Hiring a Software Development Company
- The Advantages Of Seeking An Open Source Solution Provider
- Best 5 WordPress Plugins Used in 2011

