Optimizing URLs with the Path module

Google Sniper

Search Engine Traffic Guide

Get Instant Access

Clean URLs are not enough. Sure, search engines can read the URL but that's just the first step to making your web site addresses work for you. Search engines look at the URL for keywords just like they look at the Page Title or the body content. That means that a site with keywords in the URL path will do better than a site without them. Thankfully, Drupal core includes the Path module which lets you write your own paths.

The path is the part of the URL that comes after the top level domain

_• (com, org, edu, biz, info, and us are a few examples of the top level

\ domains) but before any question marks (? indicates the beginning of the query strings that are passed to the database). For example, in the URL

http://www.yourDrupalsite.com/nodeZ2 the path is node/2.

The Path module allows you to manually create search engine friendly URLs based on your content. This allows you to get addresses that look like the following URLs:

http://www.yourDrupalsite.com/golf/best-american-courses.html instead of,

http://www.yourDrupalsite.com/node/84 5 7 or even

The Path module was originally written and maintained by the great Matt Westgate, who has contributed early and often to Drupal's success. Thanks, Matt! As of Drupal 4.3, the Path module was rolled up into Drupal core.

How to turn on the Path module

Although the Path module is part of Drupal core, it's not turned on by default. To turn it on:

1. Visit the link, http://www.yourDrupalsite.com/admin/build/modules or go to the admin screen and click on Modules.

2. Find the Core - optional section and then find Path. Add a check in the box.

3. Click on Save configuration.

4. Now visit http://www.yourDrupalsite.com/admin/user/permissions or go to Admin | User management | Permissions and give permissions to users that need to create custom paths.

How to change a content path

1. Point your browser at the node for which you want to create a custom path.

° To create new content, visit http://www.yourDrupalsite. com/node/add

° To edit existing content, browse to that node and click on the Edit tab

1:: Co mm ant setti ngs w URL path settings contact

Optionally specify an alternative URL by which this node can be accessed. For example, type "about'1 when writing an about page. Use a relative path and don't add a trailing slash or the URL alias won't work.

& Authoring information c> Publishing options

2. In the URL path settings field, put the path that you wish to show in the URL. Only put the text that shows up after the / that comes after the base URL. For example, if you want the alias to be http://www.yourDrupalsite. com/contact then you would put contact in the field. Do not put a trailing slash but you can put slashes in the field to simulate directories. For example, if you put contact/austin-office it would show up like this: http://www.yourDrupalsite.com/contact/austin-office.

3. Click on the Save button.

Writing optimized URLs

Writing optimized URLs is straightforward if you know your keywords. Simply put your keywords in the path separated by dashes.

http://www.yourDrupalsite.com/gaming-computer

It can be helpful to simulate hierarchy if you have a lot of content that goes together.

You would do that like this:

http://www.yourDrupalsite.com/computer/tower

http://www.yourDrupalsite.com/computer/tower/gaming/

http://www.yourDrupalsite.com/computer/tower/business/

Use file extensions

It's a good idea to use file extensions on the pages you create for your web site. First, when Google visits your site, they're trying to figure out what kind of page they're looking at. They do a pretty good job of identifying HTML, PHP, XML, EXE and other type of files but you can help them out by including .html, .htm, or .php as a file extension. Second, many users pay attention to the links they're clicking on and telling them that they're going to land on a standard HTML page can be reassuring in this day and age of fishing and virus attacks. It can just add that little bit of reassurance they need to visit your page with confidence.

Was this article helpful?

0 0
100 SEO Tips

100 SEO Tips

100 SEO Tips EVERY SEO Enthusiast Should Know. This Report 100 SEO Tips will help you to Utilize These Tips to Dominate The Search Engine Today.

Get My Free Ebook


Post a comment