Solved

HTML canonical / 301 redirect confusion

Posted on 2014-09-17
4
147 Views
Last Modified: 2014-09-24
I have a website www.acesestimating.com.
I want acesestimating.com to forward to www.acesestimating.com
To address this I added the following to my .htaccess file:

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

It appears to work... typing either address leads to www...

I'm concerned about duplicate content now... It appears that:

acesestimating.com/Free-Trial
www.acesestimating.com/Free-Trial
www.acesestimating.com/Free-Trial.php

can be interpreted as duplicate pages where there is only one physical page.  In the header section of Free-Trial.php I added:

<link rel="canonical" href="http://www.acesestimating.com/Free-Trial" />

Yet when testing using various sites they'll suggest that the canonical tag doesn't exist or isn't correct...

Please help.
0
Comment
Question by:classnet
  • 2
  • 2
4 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
Actually you don't need the canonical.  The 301 on the re-direct tells the search engines that you are doing a permanent re-direct.  They no it is not duplicate content, and over time they will drop the pages without the www from search results and only return the www version.  The 301 is the method recommended by Google and will never result in the pages looking like duplicate content as long as you do not put both in a sitemap.

Cd&
0
 

Author Comment

by:classnet
Comment Utility
COBOLdinosaur... so you think that, as long as the sitemap doesn't list any pages twice that I shouldn't be negatively impacted via SEO?
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
Comment Utility
Right.  As long as the 301 re-direct works there is no problem.  When the pages are crawled the crawler gets a 301 response and then gets the page where they have been re-directed. The crawler then saves the new address in its data and when it is process on the indexing server the index gets updated.  Over time the old links get dropped from the index; replaced by the updated information, but if a crawler runs across an old version of the link on another site, the re-direct still gets it to the newest version.  The crawler never sees the old page because it has been re-directed, so there is no duplicate page.

Cd&
0
 

Author Closing Comment

by:classnet
Comment Utility
Thank you for the clarification
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now