Article Categories
- Advertising
- Affiliate Marketing
- Article Marketing
- Blogs & Podcasts
- Branding
- Business
- Cloud Technology
- Ecommerce
- Email Marketing
- Keywords
- Linking Strategies
- List Building
- Local Search
- Marketing
- Miscellaneous
- Mobile Applications
- Page Rank
- Pay Per Click
- RSS
- Sales Copy
- SE Optimization
- SE Positioning
- SE Submission
- SE Tactics
- Search Engine Marketing (SEM)
- Security
- Social Media Marketing
- Social Networking
- SPAM
- SPN Featured Articles
- Technology
- Video Marketing
- Virtual Office/Telecommuting
- Web 2.0
- Web Design
- Web Development
- Webmasters
- Website Promotion
- Website Traffic
- WordPress
- Writing
SiteProNews Blogs
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.
About the Author: Phil runs a web development resource site. Find yourself asking, Where do I buy web hosting? Read all about it on Phil’s site!
Webmaster Headlines
Amazon Axes Cloud Storage Prices
Microsoft, 24/7 Want To Better Serve Your Customers
Trendnet security cam flaw exposes video feeds on net
Apple supplier employee describes working conditions
Google Chrome Is Now Available For Android (And It's Fantastic)
SEO and Social: It Isn't One or the Other
How to Create Marketing Offers That Don't Fall Flat
9 Free Tools For Link Discovery & Content Creation
7 Must Have Search Related Chrome Extensions for 2012
8 Quick Tips for Writing Bullet Points People Actually Want to Read
Recent SiteProNews Articles
RecentSiteProNews ArticlesInternet Video Hosting Strategies and Tips – A SPN Exclusive Article
7 Things NOT to Waste Your Time On When Doing SEO – A SEO-News Exclusive Article
How To Write An SEO-Friendly Article
Guru Kool-Aid: Are You Drinking It? – A SPN Exclusive Article
SiteProNews Blog News
Google Celebrates Art Clokey’s Birthday
Not many people will recognize the name Art Clokey. But a lot more people will recognize the green c...
more >
Reader Rescue : Should My Meta Description Tags Just Duplicate My Title Tags?
Hi Everyone
From early days learning SEO, I went ahead and did all my meta descriptions with a bi...
more >
Death of Steve Jobs Fails to Break Twitter Record
We all heard the sad news yesterday that Steve Jobs, founder and visionary at Apple, had died at...
more >








One Response to “Use Descriptive URLs to Bolster Your Search Engine Rankings!”
Trackbacks