Web Design and Development
If you are integrating WordPress into a preexisting site that already has its own homepage, or if you are developing a new WordPress website that is hidden behind a Coming Soon page, you will run into one frustrating problem. If you try to access the WordPress installation by visiting the index.php file, you won’t be able to see it. Instead, WordPress will automatically redirect you from the index.php page to the blog address url, as defined in your WordPress site settings.
There are, of course, several ways to get around this problem. Two common ways include:
Unfortunately, these methods can result in quite a bit of extra work. Fortunately, it is easy to stop WordPress’ automatic redirects. But first, it is a good idea to know why WordPress employs these redirects.
A page on any website, WordPress or not, can be accessed by multiple urls. For example, you can typically visit the home page of a WordPress web site by all of the following urls:
The problem with allowing all of these ways to access a single page is that it can potentially hurt your website’s overall search engine optimization (SEO). Having multiple urls for a page means that search engines could index duplicate copies. So WordPress fixes this problem by employing automatic redirects known as Canonical URL Redirection, which only enables one url per page.
To turn off Canonical URL Redirection, you can add the following code to your theme’s functions.php file.
Not comfortable altering your theme files? WP developer Mark Jaquith has placed this code in his Disable Canonical URL Redirection plugin.
To learn more about the introduction of Canonical URLs, see Migrating Plugins and Themes to 2.3 in the WordPress Codex.Tags: redirects, search engine submission, urls, WordPress