With the start of the new year come thoughts of doing some cleaning up of your website. Some of your file names have spaces in them like my page my page name.html. A Windows system will have no trouble with the file name either on the server or on your own computer. A UNIX operating systems (which run most servers) will have problems with them, and interprets the space as a "%20" character and looks for a file named: my%20page%20name.html.
You go through and rename those pages on your site but what if Google has already indexed your site? What if that page already has a nice page rank? By changing the file names, you run the risk of losing traffic and leaving visitors to your site who follow a search engine link with the dreaded "Error 404 - File not found." Creating a 301 permanent redirect is the best way to go.
N. B. If your site is hosted on a free server like RootsWeb or your ISP space, you are probably NOT going to have access to your .htaccess file to follow these instructions.
IMPORTANT! - If you want to redirect a non www domain to a www domain, you will need to follow the Google Canonical problems - www versus non.www tutorial.
Google says:
If you need to change the URL of a page as it is shown in search engine results, we recommended that you use a server-side 301 redirect. This is the best way to ensure that users and search engines are directed to the correct page. The 301 status code means that a page has permanently moved to a new location.
301 redirects are particularly useful in the following circumstances:
- You've moved your site to a new domain, and you want to make the transition as seamless as possible.
Example: I created a new domain for all of my Expression Web Tutorials and created a 301 redirect from the old domain to the new domain.- People access your site through several different URLs. If, for example, your home page can be reached in multiple ways - for instance, http://example.com/ or http://www.example.com - it's a good idea to pick one of those URLs as your preferred (canonical) destination, and use 301 redirects to send traffic from the other URLs to your preferred URL. Detailed Tutorial www versus non.www
A 301 redirect is implemented in your .htaccess file. If you already have an .htaccess file on your server, you will need to download the file in the root directory of where all your web pages are stored. If there is no .htaccess file there, you can create one with Notepad. If there are lines of code that are already a part of your .htacess file, be very careful not to change any existing line or lines.
Do not add "http://www" to the first part of the statement - just put the path from the top level of your site to the page. Also ensure that you leave a single space between these elements:
redirect 301 (the instruction that the page has moved)
/old/old-file-name.htm (the original folder path and file name)
http://www.your-domain.com/new.htm (new path and file name)
The next time the search engines spider your site, they will follow the rule you have created in your .htaccess file. During the next update, the old file name and path will be dropped and replaced with the new one. It will NOT happen overnight.
Updated: October 15, 2018
Planning a Genealogy Website 2nd Edition is available as a 42 page EBook in pdf format for you to download. It has been totally revised and updated with new content. The EBook is zipped for faster download. Save it to your desktop, extract the file and it is ready to use.
April 2007 - April 2013
Disclosure: This is an affiliate link, which means that if you visit Bluehost.com through this link and purchase this product, I’ll get a commission.
Microsoft® and FrontPage® and Expression Web® are registered trademarks of Microsoft® Corporation.
Genealogy Computer Tips | Expression Web Tutorials & Templates