iSnare.com - Free Content Articles Directory
Authors Contents [Advanced Search][Add OpenSearch][Job Search]
Distribute your articles to thousands of article sites for only $2 and below! Read more...

Index  Internet
 

Use Descriptive URLs to Bolster Your Search Engine Rankings!

 
[ Contact the Author] [ Send to a Friend] [ Article Publisher] [Make PDF] [ Print] [ Bookmark & Share]
 
Read our Terms of Service before reprinting this article. The submitter specified above has claimed the rights to this article.
Amy Chen

Dynamically generated pages, such as those made by PHP scripts, usually have URLs that aren't very readable, like "mysite.com/script.php?id=3951&page=2". The URL doesn't say anything at all as to what the page is, other than showing that it's generated by a script. If you want to make your dynamic pages more search engine friendly, rewrite your scripts to use descriptive URLs!

A URL like "mysite.com/blogpost/3951-People-Know-What-This-Is.html" would be a lot better, wouldn't it? Right off the bat, you know what the page is about. If you're scrolling through your recent pages, you can find exactly what you're looking for a lot easier. More importantly though, search engines love URLs like these, so you get a nice rankings boost!

As a PHP programmer, I'm going to detail this technique with PHP, but the same principle applies to whatever serverside scripting language you use.

To start, have the script execute as a file without the extension, instead of with the .php extension (or or .jsp, or whatever extension your language uses). On Apache servers, you can use a ForceType statement in the .htaccess file to make the script execute as application/x-httpd-php. This tells Apache to run the file as a script instead of just spitting out your code.

Right now, your script should work properly as "mysite.com/script?id=3951&page=2". It's no longer readily apparent which language your site uses, but you can still tell that it's a dynamic page. Let's fix that next, by using PHP's explode function to break up the argument list. Using this, the arguments to your script will look like folders on your server instead of parameters to a script:

$args = explode("/",$_SERVER['PHP_SELF']);

Now, if you were to access "mysite.com/script/3951/2", $args would become an array with "3951" and "2". You can replace the slash with a hyphen to separate arguments without making them look like directory entries, or use a second explode statement to break down some of the arguments in a different way.

Finally, write some code that converts the title of the content (be it the blog post name, forum topic, etc.) into an argument, substituting dashes for spaces. Some people use underscores instead of dashes, but the search engines don't see underscored words as separate terms, so you end up with the search engine thinking "This_Is_My_Post" is one big word.

Add a pinch of code at the top of the script to make ensure that the URL matches the one you want it to be (so it redirects thread/4614-wrong-name-1 to thread/4614-This-is-my-posts-name-1), then add .html to the end of it (so it looks like an innocent html file) and you're good to go!

To prevent stuffing the url with words that don't really matter, use the string replace functions to remove words such as "I", "The", and "And" from the URL.

Most search engines won't completely index your website if it's all stuffed into argument lists, so by having URLs that look like normal filenames you both ensure that all of your pages are indexed and increase your search engine optimization. Making your URLs readable by humans is juts an added bonus. Make sure to update the links within your site to reflect your new URLs, so your page doesn't turn into a smattering of redirects.

Important NoticeDISCLAIMER: All information, content, and data in this article are sole opinions and/or findings of the individual user or organization that registered and submitted this article at Isnare.com without any fee. The article is strictly for educational or entertainment purposes only and should not be used in any way, implemented or applied without consultation from a professional. We at Isnare.com do not, in anyway, contribute or include our own findings, facts and opinions in any articles presented in this site. Publishing this article does not constitute Isnare.com's support or sponsorship for this article. Isnare.com is an article publishing service. Please read our Terms of Service for more information.

Phil runs a web development resource site. Find yourself asking, Where do I buy web hosting? Read all about it on Phil's site!

Article Tags: script [See Dictionary], search [See Dictionary], urls [See Dictionary]
Got a question about this article? Ask the community!
Article published on March 06, 2009 at Isnare.com
 
Rate this article:

Quick and Simple Overview on Webhosting Services
Submitted by: Ani K

In the present internet world, if we think of something we can get it with in no time It is possible because of the ease of access to the internet where one can search for anything and can get the best result...

How Important is Web Design?
Submitted by: Derek Rogers

Many small business owners ask themselves the same question, "just how important is web design for the success of my website and my overall business...

How to Choose a Content Management System
Submitted by: Derek Rogers

A content management system can be an extremely powerful tool to have your disposal When properly matched with the needs of a particular company, it can be a seamless way to add more content to a website, edit existing content and quickly move things around, manage your materials and more...

How to Choose a Web Design Agency
Submitted by: Derek Rogers

When developing a website, there are many factors that you have to consider After all, your website isn't just an online destination; it's the online representation of your business and your brand...

Is Small Business Web Design Different to Larger Companies?
Submitted by: Derek Rogers

If you're ready to develop your own website and online presence, of course you are thinking about getting your own specific needs met...

Optimizing Your Affiliate Pages
Submitted by: Diana White

With no doubt, Affiliate Marketing is one of the most rewarded jobs in the Web However, it is not an easy field to rank due to the raising competition...

Online Shopping - For Hottest Deals
Submitted by: Robert E. Finch

This is the age of internet and people like to do all their research over the net before they finalize on something...

5 Tips For Website Project Success
Submitted by: Vann Baker

Many website projects actually fail before they even get started This is not intentional, but with technology-driven projects, it is easy to get derailed before the train is out of the station...

Five Tips to Discard Google and Create an Alternative SEO
Submitted by: Klast Munevar

Undoubtedly, Google is the major search engine and the king of the Internet As a logical consequence, all the internet marketers ―independently if they're PPC or affiliate based― know the advantages of working along with its incredible power and the real advantages of its positioned name...

Redesigning Your Website For Success
Submitted by: Vann Baker

What exactly is website "redesign" and why is it necessary Re-designing a website is often thought of as being more of a graphic design process—taking an older website and give it a totally new look so visitors and customers will take notice, or perhaps adding more content to the website so information is readily available to existing or potential customers...

Website Request For Proposal (RFP)—Invaluable
Submitted by: Vann Baker

Why do website projects fail or fall short of expectations Many businesses have the experience of their last website project taking far too long to complete, going over budget and in the end just did not measure up to expectations...

What is a Content Management System (CMS)?
Submitted by: Vann Baker

A content management systems, or CMS, is a great way to manage the content of your website, especially if you have a larger website and different people who are responsible for different parts of the website...

Web Hosting Explained For Newbies
Submitted by: Loren Squires

Introduction Very basically, web hosting is renting space, and certain services, on a fairly powerful computer called a ‘server’, or ‘web server’, that is connected to the internet...

How to Discover the Finest Work at Home Idea?
Submitted by: Seomul Evans

A lot of people are pulled in by their ambition of being able to make an income working online from home...

Basics Internet Marketing Tips You Can Afford to Miss?
Submitted by: Seomul Evans

Online marketing is more important than early kinds by traditional marketing particularly from the point by view of an average out Joe as if you and me...

Isnare.com Footer Divider

© 2004-2009. Isnare Free Articles - An Isnare Online Technologies Free Articles Project. All Rights Reserved.   Privacy Policy