Website Helpers.com

  Articles, tips, and resources for webmasters

a project by Michael Bluejay | email

SEO 101:
Table of Contents

  • Introduction
  • Myths & Facts
  • Submission and Spidering
    • Submission
    • The spider keeps on comin'
    • Removing barriers to spidering
  • Keywords
    • Avoid single-word terms
    • Avoid terms that are too broad
    • Avoid terms that are too specific
    • Avoid terms that are unpopular
    • Avoid highly-competitive terms
    • Mine your server reports
    • Target word variants and word order
  • Ranking Factors
    • Content is King
    • One-page factors
    • Page Weight
    • Dead Links
    • META tags
    • Unknown Factors
  • NON-Ranking Factors
    • META Keywords
    • ALT text
    • Title attribute
    • Web Standards
    • Dedicated IP address
    • Changing hosts or IP's
    • Adsense
    • Resubmitting a site
  • Penalties
    • Over-Optimization penalties
    • Non-WWW penalties
    • Black Hat SEO penalties
    • Paid Links penalty
    • Duplicate Content penalty
    • Why did my site disappear?!
  • Black Hat SEO
    • Invisible text
    • Cloaking
    • Keyword stuffing
    • Doorway Pages
    • Orphaned Pages
    • Spam
  • Links
    • Anchor Text
    • Links in the body copy
    • Internal Links
    • PageRank
    • Backlinks
    • Reciprocal Links
    • Link Farms and Directories
    • Buying and Selling Links
    • Pages not passing PR
    • Link Age
    • Relevance and Authority
    • Suspicious Activity
    • Splitting PR (removing or forcing theWWW)
    • Summary of link factors
  • Changing domains, and renaming pages
    • Move a whole site
    • Move a directory to a new domain
    • Move specific pages
    • Advanced Redirecting
  • Hiring professional help
  • Summarized recommendations
  • Further Resources

How to get good search engine rankings

« Part 9: Linking & Link Factors

Part 10: Changing domains and renaming pages

Part 11: Hiring professional help »

Moving a site to another domain, or even renaming a page, always carries the risk of losing rankings, usually temporarily, but possibly long-term. Using Apache 301 Redirects as discussed below is supposed to preserve your rankings, but my experience is that that doesn't work in every case. The best strategy is the old saying: An ounce of prevention is worth a pound of cure. Spend some time choosing a good domain name and planning your directory structure and filename conventions so you don't find yourself wanting to change filenames or directory names once the site is already set up and you're already ranking well.

That advice is all well and good, but you'll still find yourself in a position someday where you want or need to move or rename files, or even change domain names. The best way to do this is with the Redirect command in the Apache server software. If you're using some other kind of server software (e.g., Microsoft) then I don't know how redirecting is done and I can't help you.

Redirect commands are placed in the < .htaccess> file at the top level of the server (the same level where your <index.html> file is). If you already have such a file there you can edit it. If there's no .htacess file then you can create one. It's just a plain text file. Note that the filename begins with a period. Also note that some FTP software doesn't show filenames that start with a period unless you explicitly tell it to do so, and neither Mac OS X nor Windows like filenames that start with a period, either.

If you're editing an existing .htaccess file, you can put the new commands anywhere in the file, either at the top or bottom, it doesn't matter. If you have an existing .htaccess file, back it up first before you start messing with it. Also, realize that any error in your .htaccess file will bring your whole site down. If you introduce a syntax error then visitors will see the dreaded "Internal server error" message when they try to access any page on your site. So every time you edit an .htaccess file, reload your site in a browser and make sure it still works okay. (If it doesn't work and you can't find the problem, then restore from your backup until you can.) Testing your site after every edit to .htaccess is not just something for newbies; I reload my site in a browser every time I edit an .htaccess file, no matter how simple the change. Every time. Whenever you do something that has the potential to bring your whole site down, then it behooves you to verify that you didn't.

Redirecting all requests a new domain

To redirect all requests to a new domain, assuming the file structure on the new domain is identical to the old one, type:
Redirect 301 / http://newdomain.com/

The Redirect tells the server it's going to be sending requests somewhere else.

The 301 is the code sent to the requesting browser or bot, to tell it that the file has permanently moved. This is how you inform the search engines that your files have moved for good. If you wanted to move a file temporarily, you'd use 302 instead.

The / means that you want all files starting at the root level, and all the subdirectories, and all the files within them, etc. In other words, you want to redirect a request for any file on the site.

The http://newdomain.com/ is where the request actually gets sent to. This mirrors the old domain. If someone requested http://olddomain.com/booboo they're going to wind up at http://newdomain.com/booboo automatically.

Note that the reference to the old domain is relative (without the http://) and the reference to the new domain is absolute (must use the http://). Also, note that the reference to the new domain ends with a slash. If you omit that then it won't work -- the request in the previous example would have gone to http://newdomain.combooboo.

Redirecting a directory to a new domain

Let's say part of your site has gotten really big and/or popular and now you want to move all that content to a new domain. It's easy to redirect all content from a directory on one site to a completely new domain:
Redirect 301 /olddirectory http://newdomain.com/

Let's say you had a directory about bicycling, at http://olddomain.com/bicycles, and now you want to move that content to CrazyBicycling.com. No problem:

Redirect 301 /bicycles http://CrazyBicycling.com/

Now a request for, say, http://olddomain.com/bicycles/article.html will redirect to http://CrazyBicycles.com/article.html.

Redirecting individual pages

To redirect specific pages, either within a domain or to a new domain, you can use a bunch of 301's right after another:
Redirect 301 /oldpage1.html http://domain.com/newpage1.html
 Redirect 301 /oldpage2.html http://domain.com/newpage2.html
 Redirect 301 /oldpage3.html http://domain.com/newpage3.html

This doesn't cause an appreciable slowdown in the server. I reported about my tests on this subject on Webmaster World.

Advanced Redirecting

There's a more powerful -- and complicated -- way to redirect pages with Apache called mod rewrite which lets you redirect requests based on any combination of filename, directory name, extension, referrer, or even IP address attributes. The simple Redirect command above is all you need for basic redirects, but if you ever find yourself needing to redirect in a way that you can't do with the Redirect command, be sure to look into mod rewrite.

 

Now continue this series below... 

« Part 9: Linking & Link Factors
Part 10: Changing domains and renaming pages
Part 11: Hiring professional help »

I was born into a cult.

The Aesthetic Realism Foundation is a small psychological cult in New York city. My grandparents were members, so my mother was born into it, and so was I. Recently I created a website about the cult to get the word out. I hope you'll check it out.

 

We'll cry if you don't link to us.

http://WebsiteHelpers.com/seo

 

©2004-08 Michael Bluejay Inc. • All Rights Reserved • Please do not reprint without permission