Hello.
I am trying to make sure that my website is as search engine friendly as it can be. I've verified my site with Google Webmaster etc, etc.

The question which I am puzzling over is, 'Should I use a trailing slash at the end of my URL?'. Does it matter?

Please give me an advice you can!
Thanks

Comments

runssl’s picture

I prefer to end with a .htm some say that search engines give preference to pages that appear to be static.

Discount SSL Certificates http://www.runssl.com

Anonymous’s picture

Does anyone else have an opinion on this matter?

Thanks Runssl for your imput- you have an interesting point!

dnewkerk’s picture

There's various debates as to whether slash or no-slash is better from a semantic/usability perspective (particularly since historically before CMS's became predominant, a slash at the end literally meant "this is a directory" and no slash literally meant "this is a file"), but in either case it's not going to matter to search engines. The important thing is to choose one or the other, and be completely consistent in how you use it. For instance, if you manually type in a link on your site, make sure you type it either with or without the slash, every time (depending on which you choose). With Drupal it's much easier to choose "without" slash, as that's how it naturally works. There's a setting (which I requested actually) in Global Redirect module to allow the slash to be kept, though I've not had time to test whether this has any negative side effects on "other" modules. In my case I requested this because of a static HTML site which I am transferring to Drupal - it has, of course, slashes - so I want to preserve the exact URLs that google is already aware of and listing high in rankings. If your site is new though or you don't have search engine ranks you absolutely cannot afford to lose (even temporarily) then go with no slash.

So far as adding fake file extensions... I'd bet this has no positive effect on search engines (google "knows" that you are using Drupal, and won't care about your fake extensions). Yes, the people who make google's algorithms are aware of one of the most common/popular CMS's out there, and how its URL structures work. Use fake file extensions "only" if you are transferring from a site made with real files, and want to retain a large number of backlinks without resorting to 301 redirects.

-- David
davidnewkerk.com | absolutecross.com
View my Drupal lessons & guides

Anonymous’s picture

Thanks David thats excellent advice!
Very useful.
-Tom

Coupon Code Swap’s picture

I always leave off the file extension for shorter and cleaner looking URLs + future-proofing if the web technology used for the site changes (i.e. changing site from static .html to dynamic .php). If there are no file extensions, URLs remain the same regardless of platform used in the future.

For the trailing slash, I leave that off too. Technically, a trailing slash denotes a directory rather than a file. I don't think it is very accurate to add the trailing slash so that every page becomes a directory. Also, there is the theory that the deeper you go in directories, the less favorable it is in terms of SEO.

Here's some more info on this from W3: http://www.w3.org/Provider/Style/URI