Joomla 1.7 now features a terrific redirect component, which will make preventing 404 page not found errors in your site redesigns and migrations much easier. This component is particularly important now that many are starting to migrate their sites from Joomla 1.5 to 1.7.
The Redirect component is designed to redirect visitors from one URL to another, as the name implies. There are two obvious applications for this component.
- You could redirect a visitor if you want to create a unique URL for a marketing campaign (say www.yoursite.com/campaign redirects to www.yoursite.com/something/something/somethingelse.html).
- You could also redirect a visitor who might have bookmarked a link on an old website, and now they want to find the equivalent new page, or something close to it.
Less obvious, but still valuable, are these applications:
- The Redirect component will show you how people might be trying to compromise your site. For example, someone might enter several different URL variations for accessing phpMyAdmin, or they’re looking for the WordPress login page (for your Joomla site).
- People may type in a URL looking for some piece of functionality or expected content (think www.mysite.com/mobile).
Recently, 4Web migrated their website from Joomla 1.5 to 1.7. I have been fascinated to watch how the Redirect component has handled this change. It has been invaluable for redirecting URLs from the old site to this new site.
So how does the Redirect component work?
The Redirect component is available in Joomla 1.6 and later versions. It was buggy for quite a while (including many of the release candidates), but it appears stable at this point.
When you install Joomla 1.7, the Redirect component is turned on by default.
Go to Components – Redirect
You will see a section of the screen like this:
The columns indicate the following:
- Expired URL: this is the URL that someone entered to access your page. Keep in mind that some of these URLs will be typos, while others will have nothing to do with your site (like someone looking for the WordPress admin page). However, many will be URLs that might have pointed to your old website, or pages that you have removed from your current site.
- New URL: In general, this column will be blank. When someone enters what’s in the expired URL field, the New URL is where they will be directed.
- Referring Page: If someone followed a link to get to your page, this may be recorded in this column. You can contact this site’s owner and ask them to change the link. However, in most cases for 4Web’s site, this column has been blank.
- The remaining columns include Created Date (when the error was recorded), whether the redirect is published or not (default is unpublished), and the redirect ID.
Click on one of the expired URLs and you will come to a page where you can configure the new URL. Simply enter the new URL in the correct location. Be sure to publish the redirect, or it will not be active. There is also a space for recording a comment in regards to the redirect. (For example, “this URL was for the XYZ marketing campaign”)
You can also create a new redirect by clicking the New button in the upper right. Enter the expired and new URLs, enter a comment if you wish, and publish. This is how you’d create a redirect for the marketing department and their next campaign.
How can I use the redirect component once I launch my new site redesign?
When redesigning your site, in most cases, the URLs for the old site don’t completely match the URLs for the new site. Some may overlap, but typically, there isn’t a 100% transfer.
You can take two approaches to using the redirect component when completing a site redesign.
Get ahead of people looking for pages that no longer exist. You can program a redirect for some or all of the old URLs from the site to the new URLs on the new site. Simply enter them one by one.
Advantage: Customers do not experience a 404 page, if they bookmarked a page on the old site, or if they used a search engine to find a specific page on the site that no longer exists.
Disadvantage: Time-consuming for big sites, particularly those with hundreds (or thousands or millions) of pages. You could always use your site statistics (Google Analytics or others) to determine which pages get the most traffic on the old site, and set up redirects for those pages specifically and ignore the others, taking more of a reactive approach.
Rather than taking the time to program redirects in advance, the Redirect component will record every “bad” URL that causes a 404. You can then set up redirects for all of these as they happen.
Advantage: You don’t have to set up all of those redirects in advance.
Disadvantage: You must react to the redirects as they happen. The first week or so after launch will generate the majority of redirects, and they’ll taper off significantly after that.
The best approach? Of course, it depends. It’s likely some combination of the two approaches, but it will depend on the site’s size and traffic.
How can I turn off the Redirect component?
You can disable the Redirect component by unpublishing the plugin that goes with the component. However, if you do that, none of your redirects will work anymore.