URL Optimization
URL Structure
Another indicator search engines use to determine how to index you pages is the structure and keyword usage in the URL’s. Google can use each keyword as another way to learn what the page is about and index accordingly.
Poor URL Structure: No good keywords, confusing special characters (%&) and dynamic generated sub-pages
Good URL Structure: Good keywords, clean layout and static page
URL Rewrites and Redirects
The optimized structure of a site’s sub-page URLs can really help search engines know how to index a page, and aid in determining what keywords are the most important, and what the page should be ranked for. Additionally, combining the SEO equity of two different versions of a URL can help unite the link juice from each version and focus the impact to improve rankings. URL rewrites and redirects include tools for doing this.
Mod_Rewrites
If you want to turn a dynamic, database generated, ugly URL into a good looking, relevant, search engine friendly address, you’re going to need to use a mod_rewrite.
A URL that looks like this:
http://uglyexample.com/weblog/index.php?y=2000&m=11id=5678
Can be rewritten to look like this:
http://niceexample.com/blog/tennis_racket_reviews
Gravitate Online edits the .htaccess file, in the root directory to create an engine rewrite. Inside this file, we turn on the rewrite engine and add the rules that actually rewrite the URLs. A sample looks like this:
RewriteEngine On
RewriteRule ^weblog/([0-9]{4})/([0-9]{2})/([0-9]{2})/([a-z0-9\-]+)$ /weblog/index.php?y=$1&m=$2&d=$3&n=$4 [L]
Redirects
URL redirects are different from rewrites. While rewrites make URLs look more logical and easier to read, redirects point multiple versions of one page all to one URL.
Why is this necessary? Search engines often see one page of content with more than one URL. Examples include:
WWW and non-WWW pages: http://www.example.com and http://example.com can be looked at as two separate pages. Although you make think of them as the exact same page, if you get a link coming to your site to the non-www page, Google may not give the www page credit for the link (see our information about the importance of links). So, each page will have a separate inbound link count. It is so much more powerful to have all those links funneled into the same page, rather than divided into both pages.
Page changes: As you site grows, it is very common for some pages to become obsolete and out of date. Usually, these are deleted, and a new page is created with the new content. This is all fine and good, but any inbound links coming to the old page, are now lost, so the site loses some of it’s valuable link juice. If a redirect is created, then the old link will simply forward to the new URL, and all the SEO equity has been preserved.
Two types of redirects are employed to point search engines, and users to the correct page. It is critical that the correct one is used, or your site will not do as well in search engines. These two types are 301 and 302 redirects.
301 Redirect: The preferred redirect for optimizing your site, it essentially tells search engines that this redirect command is permanent and will not be changing.
302 Redirect: Rarely use this command, as it lets search engines know that the redirect is only temporary, so it is much less valued than the 301 redirect. The more stable and long term the redirect, the more value will be given by search engines.
The redirect code is placed, by Gravitate Online, into the .htaccess file in the sites root directory. The code will look something like this:
RewriteEngine on
RewriteCond %{QUERY_STRING} ^id=13$
RewriteRule ^/page.php$ http://www.example.com/newname.htm? [L,R=301]
Canonical Issues
When 301 redirects won’t do the job, it may be an occasion to use the rel=canonical tag on a page. One meaning of ‘Canonical’ is when something is the same or equivalent to another. Such as content on one page being the same as the content on another of your pages. It is particular helpful when trying to avoid duplicate content issues on a site where the same content may be displayed on several pages. Like the use of a 301 redirect, we don’t want the SEO equity spread out over several pages, but focused on the original and most important pages on the site. The canonical tag allows us to do this, when appropriate.
Depending on the limitations of the site or CMS, this may be our only choice, as it doesn’t require access to the server side .htaccess file, but can be done at the page level. The tag is part of the HTML header on a page, in the same area you’d find the Title attribute and Meta Description tag. The code will look something like this.






