Search-engine friendly URLs

This post belongs to a series about search engine optimization (SEO) with Magnolia CMS. Today we look at creating search-engine friendly URLs.

URLs are an important SEO element for search engines as well as users. Search engines are more likely to index static, short, clean URLs. Users appreciate their readability too. While most crawlers can follow dynamically generated URLs, there is evidence that when dynamic parameters are appended to a URL, the crawler only follows them to sites considered to have high importance. Request parameters should be avoided in the URL, as the crawler may view several URLs pointing to the same content as duplicates, lowering page rank.

Good
http://www.yoursite.com/books/hardcover
Bad
http://www.yoursite.com?p=72&s=0

Page URLs should:
  • Include important keywords, as keywords are highlighted in search results. Most SEO experts agree that including them in a URL is important. Keywords also increase the likelihood of a visitor clicking through to your site.
  • Have short, case-insensitive words, separated with hyphens.
  • Be descriptive of page content. Both from the SEO and usability perspectives, an obvious URL is a good URL. URLs get pasted, shared and written down, so the more obvious the content, the better.
  • Avoid the use of meaningless numbers and extraneous information.

Magnolia produces clean, human-readable URLs by default. Dynamically generated URLs are converted to crawler-friendly static ones. Request parameters are not appended to URLs.


Some systems append session IDs to a URL. A session is typically needed when a user logs in. A user's shopping cart is an example of content that would be stored in a session. Appending session IDs to URLs is a security issue. A URL that contains an ID cannot be copied without the risk of inadvertently handing the session to another user.

Good
http://www.yoursite.com/cart
Bad
http://www.yoursite.com/cart?jsessionid=undn2i50l4
Magnolia is session-less until the user logs in. At that point, a session ID is stored in a cookie instead of appending it to the URL. This avoids the duplicate content issue and makes URLs safe to copy and share.

When creating internal links, Magnolia uses the title of the target page as anchor text by default. The title typically includes the most relevant keywords about the target page.

Minimizing length and trailing slashes will make URLs easier to copy and paste, and fully visible in search results. A Magnolia URL is equally valid, regardless of whether you include an .html suffix or slash:
http://www.magnolia-cms.com/clients/references
http://www.magnolia-cms.com/clients/references.html
http://www.magnolia-cms.com/clients/references/