Software, your way.
burger menu icon
WillMaster

WillMaster > LibraryWeb Page and Site Optimization

FREE! Coding tips, tricks, and treasures.

Possibilities weekly ezine

Get the weekly email website developers read:

 

Your email address

name@example.com
YES! Send Possibilities every week!

Search Engine Friendly Site Consolidation

Our project was to consolidate 3 websites into 1.

Domains bontragerconnection.com and bontragercgi.com to be merged into willmaster.com. Almost all current web pages at willmaster.com will be moved to different directories. Further, web pages file names will be changed to .php from .html/.shtml

As of this writing, bontragerconnection.com and willmaster.com have been merged. Over 1600 web pages were moved and the files renamed.

During all this, Google was right on top of things. The new web page locations were in the index within a day of the move and file name change. Some of the old web page locations are still in the index. It was good to see the new ones be included so fast.

This is how we did it.

Several weeks earlier, we separated a niche unrelated to website software, one which had been located in a subdirectory of willmaster.com ever since willmaster.com was born. It was solid in Google SERPS, at the top of the listing for a preferred phrase.

The niche was moved to its own domain name.

We used redirect 301s to redirect visitors and let search engine spiders know where the pages were moved to.

I was so very pleased when I did a search at Google the day following the move to the new domain. The pages at the new location were in the same spot of the search results as they were the day before. Several weeks later, and they are still maintaining their positions.

That experience removed much of my trepidation about the consolidation. I had been somewhat uncertain about what the search engine-related costs would be. It now appeared there would be very little cost, if any

The "secret" is redirect 301 statements in the .htaccess file.

Here is the format of the redirect 301 statement:

redirect 301 ________ ________

Above, you see two underscores separated with a space.

Replace the first underscore with the directory path of the old/removed file. It begins with a slash character. The directory path is relative to document root. (Document root is the directory where your domain's main/index file is located.)

Replace the second underscore with the complete http://... URL of where the web page is now located.

"301" means the page was moved permanently. (Temporary moves would be "302.)

You may already have a .htaccess file on your server. If yes, add the redirect 301 statements to the file. Otherwise, a .htaccess file will need to be created.

IMPORTANT NOTE: Some FTP programs will not list file names that begin with a period ("dot files"). Use caution that you don't overwrite an existing .htaccess file. Most FTP programs can be set so they will list dot files.

The .htaccess file is a plain text file. Creating/editing the file should be done with a plain text processor like NotePad or TextWrangler.

If all the moved pages are from one specific subdirectory, and the subdirectory still exists, the .htaccess file may be put into that subdirectory. Otherwise, use the .htaccess file in the document root.

Creating the redirect 301 lines took a bit of planning. I did not relish doing it manually — finding a file in a list of 1500+, then typing the line, and afterward copying the URL and pasting it into a browser to verify I did not make a typographical error.

Therefore, before any pages were moved, we used software to create a site map of every file on each domain.

The domain site maps were used to automatically change the file names and to ensure no two file names in the same directory were exactly alike.

The files were then moved to their new locations.

Once the new files were in place, software created a new site map.

With the before and after site maps in hand, I wrote a fuzzy logic program to compare them. If the software found a similar file name on both site maps, it output a redirect 301 line. (Similar was disregarding capitalization, underscores, hyphens, and file name extensions.)

Whenever more than one file on either list was similar, the software let me know. This allowed me to quickly find the lines and manually adjust as needed.

The .htaccess files with the redirect 301 lines were uploaded into their respective directories.

Only then were the old files deleted.

We did it that way so no person or spider would experience a 404 during the transition. And the redirect 301's let all know where the pages were moved to.

Will Bontrager

Was this article helpful to you?
(anonymous form)

Support This Website

Some of our support is from people like you who see the value of all that's offered for FREE at this website.

"Yes, let me contribute."

Amount (USD):

Tap to Choose
Contribution
Method

All information in WillMaster Library articles is presented AS-IS.

We only suggest and recommend what we believe is of value. As remuneration for the time and research involved to provide quality links, we generally use affiliate links when we can. Whenever we link to something not our own, you should assume they are affiliate links or that we benefit in some way.

How Can We Help You? balloons
How Can We Help You?
bullet Custom Programming
bullet Ready-Made Software
bullet Technical Support
bullet Possibilities Newsletter
bullet Website "How-To" Info
bullet Useful Information List

© 1998-2001 William and Mari Bontrager
© 2001-2011 Bontrager Connection, LLC
© 2011-2024 Will Bontrager Software LLC