SEO & ASP.NET: Put keywords in the URL

Thursday, August 28 2008

See the first post in this series | Previous Post

Tip #3 - Put keywords in the URL, the sooner the better.

There are 3 documented areas that Google looks for keywords: URL, Title, and finally the body of your content. So if you are not embedding keywords into your URL then you are missing an opportunity to help increase the odds of your content getting pushed higher in natural search results.

How does Google find keywords in the URL?

Take the following 4 URLs (I'm also assuming you read the previous article about how you construct your links too):

  • example.com/seoforaspnetdevelopers/
  • example.com/SeoForAspnetDevelopers/
  • example.com/seo_for_aspnet_developers/
  • example.com/seo-for-aspnet-developers/

There are 4 total keywords 'seo', 'for', 'aspnet', and 'developers'.

Which format is better? Or does it really even matter? Hopefully it comes as no surprise that the first 2 examples are virtually identical and in neither case, from what my research has shown, does Google use any casing information to pull out keywords. So the first 2 examples are very bad choices for how to format your URL if you care about SEO. In the 3rd example underscores are used to breakup the keywords and in the 4th example dashes are used.

Google has stated that the preferred way to break-up keywords in the URL is to use dashes. Most modern content management systems and blog engines use this as the preferred method.

The ordering of keywords matters

Furthermore my research has also shown that the order of your keywords also matters and the domain name is considered for keywords too. In Community Server and Graffiti we automatically build the title and URL of posts based on the subject of the post entry. Community Server goes one step further and allows you to control the URL independent of the subject. We'll add this functionality into Graffiti soon as well. The reason being that controlling the ordering of keywords in the URL matters too.

URL Rewriting

If you care about how your links are built and that you always ensure there is only one way to get to your content and you also care about the ordering of keywords then you likely care a great deal about URL rewriting: the ability to use a published URL that may not be the same URL that the application requires internally.

URL rewriting allows you to take a URL like:

  • example.com/posts/default.aspx?postid=34

and publish it as:

  • examples.com/seo/aspnet-seo-optimization-with-url-rewriting/

There are several different techniques for URL rewriting for ASP.NET and this blog post is certainly not going to attempt to address them all.

Simple URL Rewriting

The first technique for URL rewriting is very simple and simply tries to take advantage (game) the path parsing of a crawler. This technique uses a controller through which all requests are sent through and works best for cases where you are hosting the server and do not have the ability to run an ISAPI filter to rewrite URLs (or have access to IIS 7):

example.com/33.axd/seo/aspnet-seo-optimization-with-url-rewriting/

-- or --

example.com/aspnet-seo-optimization-with-url-rewriting.aspx

The latter technique is how Community Server constructs URLs, as well as other .NET blogging engines. The first technique is something new that we've been experimenting with and tried first with the Telligent Wiki Prototype that runs docs.communityserver.com and wiki.asp.net (and a few other sites).

In the first example there is an HttpHandler that looks for all requests that use the .axd extension (note any extension type will work). The handler parses the path of the request but only cares about the identifier - in this example the key is 33 - that allows it to pull the content from the database.

The second case is again a virtual handler and loads up the content based on the name of the post.

The difference or benefit from either technique is unclear. However, I suspect that the first example where slashes are used for paths will likely work better for SEO purposes. But that is conjecture.

Advanced URL Rewriting

If you have control over the server or have a more progressive host there are some other options to consider for more advanced URL rewriting.

In Graffiti we actually create files and directories to give users full control over the path vs. virtual URLs as used in Community Server. This has both some benefits and some pitfalls. The benefit is you get very clean paths with no extensions in them. The pitfall is that it does require permissions to write to the disk.

For example, a post titled "ASP.NET SEO Optimization with URL Rewriting" in a category called "SEO" would create:

  • [path to Graffiti application]\seo\aspnet-seo-optimization-with-url-rewriting\default.aspx

The URL would then be published as:

  • example.com/seo/aspnet-seo-optimization-with-url-rewriting/

This obviously works very, very well. The default.aspx page internally can store all the details, such as the post id, to quickly look up the post in the database.

Another option is to use a URL rewriting library like ISAPI Rewrite, which happens to work very similar to Apache's mod_rewrite. This is an ISAPI filter, $99 well spent, that allows to fully control all URLs for your application.

The future: IIS7

Unlike previous versions of Microsoft's Internet Information Server, IIS7 will allow for ASP.NET HttpModules to perform exactly the same tasks as ISAPI Filters. This means that you could write an HttpModule for handling all your application's URLs (similar to ISAPI Rewrite) all with .NET code!

Furthermore this also means you can do things like use ASP.NET Cookie Authentication to authenticate access to any resource (images, html page, etc.). Something that isn't easily accomplished today. Taken one step further: this also means that you could have .NET code authenticate requests that were served from a PHP application running in IIS!

If you want to read more about URL rewriting for ASP.NET check-out Scott Guthrie's article

Next Tip: Titles & MetaTags (not yet written)

35 comment(s) so far

Rob, you deserve applause for these great posts on SEO! I'm very happy that Telligent puts a lot of effort into making Community Server SEO-friendly.

Do you have plans to improve SEO in the Forum application of Community Server too?

thank you ;)

www.aybardumlu.com

brianna wrote on Thursday, November 20 2008

Hello this is Brianna visiting first time to this site and find it very interesting. I really like to join it.and really want to continue the discussion with this site..

-------

Brianna

<a href="http://www.widecircles.com" rel="dofollow">SEO</a>

Is this still an issue in Community Server's SEO?

www.andreas-kraus.net/.../communityserver

How much difference do friendly URLs *really* make? One or two places in your SERPs at best?

I'm not going to try and deny the value of keywords in the URL, but I do find that some of the more obscure technical mechanics can sometimes overshadow the more important meat and drink of good content for SEO!

Rob -- to bump an old thread -- I would be happy to talk with you about some of the intricacies on CS 2008 that could be improved in regard to url structure and seo implications. Content is king, but the right foundation plays a role. Google's recent adoption of the canonical url meta tag(http://www.mattcutts.com/blog/canonical-link-tag/) gives some serious ability to make improvements with marginal modification/effort. I worry about doing too much hacking on an install and what that does to future upgrades.

Regarding the comment about the extent to which keywords affect ranking - even if the introduction of keywords doesn't change rank, a visitor will click on the link he feels is most relevant, e3ven if it's not ranked at the top. Adding the keyword to a URL can improve the perception of a page's relevance over a similar page that has a big, ugly querystring. We have observed this to be true over the last three years on a 15K page site.

yes absolutely right we have to do some URL rewriting to make asp.net website more search engine friendly

Hi Rob,

This is great reading. Just a shame we didn't see any of this in release 5.0! Or did we?

lkjkljkljkljlk

jkhkjhjkhkhjkhjk

Well can you put a video of url rewriting here as i founf it a difficult one..

thanks for your information your information might be very helpful for the SEO peoples. with your information anyone can get the good ranking thanks for your information.

Applying the keyword to a URL can improve the page ranking.Keywords change the rank of the website.

My views on this blog is that, if you are dynamically concentrating on the keyword then the result you found after better than the you are thinking. Keywords is like soul for the body......

the title is appropriate for the blog, if you want rank on that keyword that you are working you have to work on that.

the title is appropriate for the blog, if you want rank on that keyword that you are working you have to work on.

keyword is all the thing from that you have to do your job to ranked your website......

All the things matter on the keyword the more effective your promotion more you get you told about "The technique for URL rewriting is very simple and simply tries to take advantage (game) the path parsing of a crawler. This technique uses a controller through which all requests are sent through and works best for cases where you are hosting the server and do not have the ability to run an ISAPI filter to rewrite URLs "thas really effective.

thanks for the information.

The Server goes one step ahead and they permit us to control the URL individually of the subject. Well add this function as soon as well. Reason being that controlling the ordering of keywords in the link matters too"

yes i am 100% agree with you if you are targeting a particular keyword and working hard on it then you definitely got the result.

its a new type of concept putting keyword in url but it will be defined first, you are making a web site from a keyword concept.

that's true if you're keyword is at rank and you want t it to be in top list then easiest way to get the rank put your keyword in your URL also in next page you can define.

You told about the technique use to control all requests that sent through and works best for cases where we are hosting the server and do not have the ability to run an ISAPI filter.

putting keyword in url that's really effective the website get more advantage, its new type of technique to do, thnx for sharing...

I am totally agree with you & if you are not able to purchase domain with your main market segment keyword then only this technique is helpful for you to insert targeted keywords in url. & it is very efficient technique for optimization & very helpful for SEO purpose.

As I have more then 2 year experience in SEO field & good in On site optimization so I am totally agree with you that if your main targeted keyword is appear in main url then it will provide you a lot of wattage.

I am totally agree with you & ya this technique is work very well.

Your content is really useful ..overall a nice post..thanks for sharing it with us.

I agree,Google looks for keywords: URL, Title, and finally the body of your content. because crawler crawl the page from Url,then title and at last content and if he find the keyword then he decided the rank on google search engine. thanks for the tips.

<a href=http://www.hairstraightenersusa.com>Hair straighteners</a>

<a href=http://www.hairstraightenersusa.com/product_list-GHD-Hair-Straighteners-c_192.html>GHD Hair straighteners</a>

<a href=http://www.hairstraightenersusa.com/product_list-CHI-Hair-Straightener-c_191.html>CHI Hair straightener </a>

<a href=http://www.hairstraightenersusa.com>hair iron</a>

<a href=http://www.hairstraightenersusa.com/product_list-NEW-BLUE-c__731.html>flat iron</a>

<a href=http://www.hairstraightenersusa.com/product_list-CHI-Black-c__718.html>hair straightener iron</a>

<a href=http://www.hairstraightenersusa.com/product_list-NEW-BLUE-c__731.html>GHD flat iron</a>

hi. That tips are great, thank you .I love your blog… thank you again carry on…

The handler parses the path of the request but only cares about the identifier - in this example the key is 33 - that allows it to pull the content from the database.

Hopefully it comes as no surprise that the first 2 examples are virtually identical and in neither case, from what my research has shown, does Google use any casing information to pull out keywords.

Post your comment

Comment