SEO
Permanently Redirecting URLs using 301 Headers in Static and Dynamic Sites
Permanently redirecting traffic using a 301 header is the proper and fail-safe way to ensure that your web-visitors continue to find content that has permanently moved to a new locations. Search engine ranking is crucial for any business. Web infrastructure changes and changes in best-practices can lead to a change in the URI of content items. Being that Search Engine indexes take time to update (10 days to 3 months), it is important to continue to maintain the old URLs until all the external referrers are updated.
Why there may be a need to use new paths
It is probable you have gained some knowledge and technologies have changed since you last overhauled your website and you may have a new naming system for your paths that's uniform and that hopefully embeds keywords in your document paths to maximize your ranking advantage. This situation makes it necessary for a web producer to create new URL paths for existing documents while keeping the old URLs active until everyone is updated.
How to implement
You cannot reliably depend on client technology to handle any tasks beyond the display of simple standards-compliant markup. Therefor you can employ a number of methods on the server to implement 301 Header redirects as follows:
Server-side ImplementationWindows IIS with Active Server Pages (ASP)
<%@ Language=VBScript %>
<%
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "http://newpagelocation.com/path"
Response.End
%>
PHP
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: /my-new-path");
exit();
?>
ColdFusion
<CFHEADER statuscode="301" statustext="Moved Permanently">
<CFHEADER name="Location" value="http://newpagelocation.com/path">
mod_rewrite (Apache Web Server)
rewriteEngine on
rewriteRule ^contact\.php$ http://newpagelocation.com/path [R=permanent,L]
Placing this code in the template and testing for the requested URL to see if the page has been redirect can add a heavy overhead that could slow or even cause errors in your system. It is better to create placeholder pages with the URL of the removed pages and place the 301 redirect code for each case.
NB: If your CMS can schedule publishing and archival of pages, you can determine when to retire the redirect for a given page (estimate 6 months for all Search Engines to update their indexes)
For example, to implement this in Drupal:
- Create regular node of any node type
- Select the the PHP content type
- Place the following code in it and modify the destination URL to the new path alias (for engines to index the new name as opposed to the node ID)
Create a path alias for this document bearing the URl of the OLD path Save and publish the document
_________________________
How it works
Since you create a document with the same path as the old location, when the old URL is called, the redirecting node will 301 redirect it to the new location thereby enabling you to maintain your old URLs while promoting your new paths and indicating to Search Engines that your page has moved.
NB: Sending a 301 header redirect is the best and proper way to redirect permanently moved pages.
- Client-side Redirection
- As explained at the beginning of this document, the only reliable and proper way to redirect traffic from a non-existent page and properly signal the new location is to use the 301 Header redirect. In the absence of access to server technologies, the next best thing is to use client-side scripting and META REFRESH headers to redirect traffic. These methods do not indicate a permanent change or URI and bookmark and index driven agents such as search engines and link referrers will not know that your content has moved unless a human-being manually modified the path.
-
- Javascript
<script type="text/javascript">
window.location.href='http://newpagelocation.com/path';
</script>
META REFRESH
<html>
<head>
<meta http-equiv="refresh" content="0;url=http://newpagelocation.com/path">
</head>
<body>
This page has moved to <a xhref="http://newpagelocation.com/path"> The content has moved to http://newpagelocation.com/path</a>
</body>
</html>
Web Marketing
The Internet has grown from an alternative marketing channel to the sole auditable and highly cost-effective marketing tool. Much like not-having a website is no-longer an option, having a sound and effective Web Marketing strategy is imperative for any organisation that needs to grow and interact with its customer-base and consequently increase sales and customer satisfaction.
Traditional methods of marketing communication are not effective enough since a significant amount of trade and human interaction happens on the internet. The online community is less and less exposed to traditional media because members of this group do not look to television, radio, newspapers or billboards for information and product research. Even in cases where they do, they often use the internet to access publications, television and radio programming.
One must recon that a large majority of economically capable and influential individuals belong to the above-described section of society. This makes it only reasonable to conduct marketing communication through the media that is most pervasive - Web.
Web Marketing is a combination of Opt-in Email Marketing, Search Engine Marketing, and prospect communication infrastructure such as: feedback forms, and marketing campaign management tools.
SEO within the Drupal CMS framework - Inbuilt Drupal Features that enhance Search Engine Optimization
Considerations for migrating to Drupal from a static website or other CMS
Web Content Management Systems have unfairly been blamed for killing traffic by compromising Search Engine Ranking as a result of the so-called Search Unfriendly URLs. to properly migrate a well-indexed static website to Drupal or any CMS without compromising your ranking, it is necessary to maintain existing paths. In my opinion, using a good CMS has so many advantages that the misplaced fear of machine URLs (no-longer an issue with mod_rewrite and ISAPI Rewrite).
Advantages of using a CMS
- Findability of content in development and production - Even the meticulously organized and labeled static folder structure can leave one wondering where his/her content is located; and just because you know where your pages are does not mean that your visitors know your structure.
- Automation of routine procedures - it's a life-saver when the schedule automatically publishes and archives content for you, especially when it's time-sensitive (events, announcements, press releases etc)
- Although server-side includes SSI may seem like they make it possible to create one piece of content and reuse it in multiple places, Web CMS makes it possible to add logic to the locations where you would like the content to appear
These and many other smaller advantages that one discovers while using a CMS have the potential of improving your SEO efforts (when properly used) by availing related content and links along with certain pages. Also, CMS make it possible to track content accesses at a granular level that regular logs cannot provide. As such, here is what I propose when migrating a static website to Drupal:
- Clean URLs: This feature is indispensable in making sure than even legacy search engines can access and index your pages
- GsiteMap: Google Sitemaps make it possible for site-managers to guide the way that google indexes pages on a website by providing priority guidelines. When using a WCMS, content is created and manipulated (published, archived, accessed) in a very dynamic manner that availa a virtually limitless linking structure. This makes it very difficult for you (the site owner) to create a list of documents in XML and submit the file to google on a regular basis. This module will ensure that google is informed of your (healthy) constantly updated website and any new pages you publish as well as how to find them. In addition, the WatchDog module in Drupal can log all the times when google visits and indexes a page.
- URL aliases: This feature in Drupal enables you to control the path-name of your pages thus enabling you to recreate already indexed static paths in your new CMS so that search results continue to point to your content in the new CMS home.
- Click tracking: I am the kind that constantly monitors traffic and wants to know what's working ad what's not, so by using this nice module, I can track upto 10 channels to know which traffic sources are bringing in the most traffic, and comparing these numbers as well as results from the tracker and browscap module, you can establish what is causing a perceived increase or decrease in traffic instead of guessing.
- Even without the click module, Drupal Tracker logs the referrers and will tell you who is bringing in the most traffic. Compare this with your past server-logs and you will not only be able to know the traffic sources, but also which pages are popular.
- PHPOpentracker: As tricky as it can be to properly install and configure, this application can show you exactly what paths your traffic is taking thereby helping you decide what pages need help/updates
Search Engine Indexing Experiment - Google, Yahoo, MSN and Ask.com
How long does it take to get a new website indexed?
In order to establish the truth and set this matter to rest for some time, I set out to make observations of how long it would take in a real-world experience.
It is clear to all self-respecting web publishers and producers that trying to take shortcuts and sneak to the front does not work and has the potential of jeopardizing the whole mission. I decided to follow the text-book example of SEM/SEO and take the hard narrow road that (as the good book says) is the right way despite being less attractive.
I have set out to woo the search engines and hopefully the most desired ones will be willing to rank me highly after they visit my optimized site. As many have told me, Google and it's buddies are guests you do not want to see your house in disorder. I started off with great dedication and courage as well as the hope that I would have what it takes to follow the advice in Google Hacks
- Create clean code
- Write and post good quality content for your readers
- Properly tag and describe your content so that it can be found and indexed
- When linking to others, do it sparingly lest you leak your pagerank to them
- Do not hang-out in bad neighborhoods, only link to people with good content covering topics related to your content
- Avoid too many links to sites with relatively lower pagerank unless the content is good
- Write, write, and write again
- Visit respectable forums that deal with what your site is about and contribute... it's by giving that we receive
I am doing all this and infact, I am writing an average of 3 pages a day. Granted that I have consolidated the portfolio, technical blog of my daily tasks in the subject of the web venture (Web Production, design, development as well as communications research theory). A section of the website is dedicated to the various papers and publications that have been written over the years that are yet to be availed on the web for reference and commentary.
_______________
The Web CMS submits updates to google and google is busy scouring the site for content (5 crawls per hour) because of the large amounts of content being posted (hypothesis); as expected, Google has only indexed the homepage, but not pageRanked it. MSN indexed too many pages at once and they were mostly RSS feeds. In the second fortnight, the traffic doubled. Besides being indexed, I made an effort to vist the Drupal support forums and comment on issues that I had encountered and solved always referring to an exhaustive commentary to the problem at hand on the website.
_______Timeline________
Alexa Ranking is
700458: 15-3-2006
375400: 20-3-2006
281929: 22-3-2006
222804: 29-3-2006
197353: 30-3-2006
173803: 04-4-2006
96773: 04-27-2006
78554: 05-05-2006
58685: 05-24-2006
26th March 2006 - Google search returns one page at #10 for the homepage searching for cms producer
29th March 2006 - One week after submitting iDonny.com to Yahoo and CMSproducer RSS to Yahoo, 12 pages have been indexed.
31st March 2006 - After constant authoring and submissions (gsitemap module) as well as about 12 indexing visits from Googlebot per day from google, we now have 10 pages indexed by google appearing in search.
1st April 2006 - I checked google index and BINGO! 95 pages indexed both from my site - 53 pages (cmsproducer.com) and inbound links from mySQL and Drupal forum entries in which I have so far participated. I also see that someone from google canada searched for Enterprise Document Management and read my document on that subject.
2nd April 2006 - The google index now has 140+ pages and other nodes from my website indexed and available for search! I even ranked #1 for one search composed of two words 'Bad Lonex' for a document in which I blogged on my experience at Lonex Hosting.
4th April 2006 - 294 pages are listed in the google index and the site is getting about 1/3 traffic from searches while the other 2 thirds is from documents and contributions that I have made to Drupal and Open-Source-CMS.
20th April 2006 - Google search returns the homepage at #1 'cms producer'
27th April 2006 - link:www.cmsproducer.com does not return an empty anymore and it has 12 unique listings.The amount of activity around the website (incoming links, search engine clicks, RSS subscriptions, feedback from visitors etc) has reached a point where we must stop updating this experiment report and concentrate on keeping the content updated, responding to feedback and providing high quality services.
3rd May 2006 - Upgraded the website to Drupal 4.7 for new functionality as well as to patch some problems that we causing SESSION IDs to be indexed with URLs thereby creating duplicate addresses for the same content - Now that the issue is fixed, Instead of creating 301 redirects for each of the URLs with SESSID to clear the search engine index of the bad URLs, since the whole domain will be regularly crawled and indexed on a regular basis, all that I had to do to replace the URLs with the cleaner URLs was to create a robots.tct entry that excludes URLs with session IDs such as:
Disallow: /*?PHPSESSID=
Disallow: /*?*PHPSESSID=
and the same goes for other paths that may present unwanted content to search engines
Obtain a review of your SEO activities, or related services, contact us
Next Activity
Now that the pages are indexed, I will continue to add more content and as I revise existing content, I will optimise the pages further for ranking by:
- Edit the copy for easier readability
- Focus the documents that do not have a clear theme and write new supporting documents
- Create path aliases in Drupal for key pages so that the URLs can also contain the keywords (increases ranking)
- Retag documents based on an updated Drupal Taxonomy
- Write a targeted description for every document I re-edit and use a keyword density tool to determine the appropriate keywords for each page
- Continue doing more of what has resulted in a good indexing exercise.


