Learn/Twin Home Pages: Classic SEO Mistake
Revision as of 11:07, 23 January 2014 by Asad Mahmood Butt (Created page with "== Don’t split your link juice == Most websites have a home page with something like index.php or default.aspx at the end of its URL – for example, MyWebsite.com/index.php...")
Most websites have a home page with something like index.php or default.aspx at the end of its URL – for example, MyWebsite.com/index.php There are sound technical reasons for that, which I’ll explain below. But just like your underwear, you really shouldn’t be showing that level of detail to the public.
Even worse than an unexpected glimpse of the skivvies, these extras at the end of a site’s URL could indicate that the webmaster has inadvertently crippled the site’s visibility to search engines.
What’s /index.php for, Anyway?
Webmasters usually set up a default document for a website’s home page. That default document is usually given a name that indicates it is, indeed, the definitive page – www.MyWebsite.com/index.php, /default.aspx, /main.htm, or something similar.
People looking for the website don’t actually have to type the page name that includes /index.php (or alternatives) into the browser bar. If someone just types MyWebsite.com, the web server will automatically send that person the default document for MyWebsite.com’s home page.
If everything has been set up right, the person will get the correct home page for MyWebsite.com, but will never see /index.php – not in the address bar, nor in any links in the site’s menu, nor in links from any other site to MyWebsite.com.
It’s common, though, for webmasters to link the “home” tab and home-page links to the default document – /index.php – when they should be linking instead to the simpler URL ending in just /.
That’s a problem if you want your home page to come up high in searches for keywords you care about, because search engines are now seeing two different pages for your home page:
www.MyWebsite.com/default.aspx (or /index.php, or something else)
There are two reasons why this is a bad practice. First, when a search engine sees two pages on your site with the same content, that’s an indication of low quality. Google and other search engines include quality in their ranking algorithms.
Second, recall that search engines rank web pages in search results based partly on how many links they have from relevant sites. These links can be either external – that is, from another website – or internal, meaning they’re from other pages in the same website. Incoming links can help a web page get better rankings in search results – a goodness that’s called “link juice.”
Let’s say your content is so good, you’ve managed to earn a number of links to MyWebsite.com from other, authoritative websites. Your navigation menu, however, links to www.MyWebsite.com/index.php. That means your internal links are creating link juice for the /index.php version of your home page, while all the external links are sending THEIR link juice to the simpler MyWebsite.com/ page.
In effect, you’re splitting the link juice that could make your home page more prominent in search results. And your home page is probably your most important page for getting traffic from search engines.
Stop Splitting Link Juice: Configure for A Single Home Page
There’s a simple way to make sure your home page gets all the link juice it deserves, and visitors don’t see your underwear.
Configure your web server so the main folder of website pages contains what’s called a “default document” for the home page. That default document will be set to www.MyWebsite.com/index.php, or a URL ending in something else, such as /default.aspx, /main.php, /main.htm, and so on.
When you’ve configured your web server this way, and the user types in www.mywebsite.com, the server looks at the default document setting, fetches the page (index.php in our example), and returns the content of that page to the user. But the web server won’t change the URL in the browser bar to www.MyWebsite.com/index.php. The viewer will see just www.mywebsite.com/.
If you have NEVER made this mistake, and NEVER exposed pages ending in /index.php (or other alternatives) to the outside world, good job! You have nothing to worry about.
If you HAVE exposed a link to your default document at some point, then you need to use a 301 redirect to consolidate the two pages, so search engines don’t see two pages and get confused.
Removing the Confusion
First thing: Scan your site for any web pages ending with /index.php, and change them so they end with just / instead.
Once you’ve done this, you’ll want to rename your index.php file. I suggest you call it default.php. Then change your default document to point to this new file instead of index.php.
Finally, in your .htaccess file (or a global ASP file if you’re using ASP or ASP.net), add a 301 redirect to send requests for /index.php to /.
You’re probably wondering why we had to rename index.php. We did that to avoid an endless loop. If we had redirected pages ending with /index.php to addresses ending with just /, our web server would try to fetch the default document ending with /index.php. That would then redirect to a page ending with just /, and around we’d go again.
Clean Up Your Site
Every folder in your website can have its own default document. For example, www.mywebsite.com/blog/ might actually fetch www.mywebsite.com/blog/main.asp to create the blog. Of course, you don’t want to show the page ending in main.asp to search engines, nor to people, for all the reasons explained above.
Once you’ve made sure you’re showing just a single version of every web page to search engines, you’ll know you’re showing your website to the world at its best…with underwear discreetly hidden.
- Apache.org: Setting a default document in PHP on Apache (Note: In Apache, the default document is called DirectoryIndex)
- PHP.net: Setting a default document in PHP on IIS
- Microsoft.com: Setting a default document in IIS with ASP
- WebConfs.com: Creating a 301 redirect
Read about other classic SEO mistakes even good web designers can make.