These days web design URLs are not as meaningless as they used to be. Everyone always makes sure they use SEO-friendly URLs.
For this example let’s consider the title “Web design London“
Let’s say that MintTwist have a website with a content management system and let’s consider the average CMS.
Most CMS will automatically generate an SEO friendly URL from the title of the page, as mentioned in this case, “Web design London“. This means that our SEO friendly URL will be web-design-London. But what if we don’t want that as the URL?
What we could do is have a field that allows us to enter the URL we want. Makes sense right? So we can add that, but isn’t it a bit of a bother remembering that you have to format it for a URL? Well if you use our little function below it will sanitise your input string without it having to be done on the back-end.
$.fn.slug = function()
return this.val().replace(/[^a-zA-Z 0-9-]+/g,”).toLowerCase().replace(/\s/g,’-')
This simple function will make sure that there are only alphanumeric characters and hyphens in your string so you can write your page URL without having to do it all in lower case and remembering to add a hyphen instead of a space.
You can use this function very easily; consider the example below:
var pageSlug = $(‘#pageName’).val();
To use this function on the page slug variable you would simply append the jQuery function we have created.
var pageSlug = $(‘#pageName’).val().slug();
Read Full Post »
Dynamic websites are becoming more and more common as companies and individuals are realising that the internet is the best way to do business these days, and SEO (Search Engine Optimisation) is becoming more of a widely used term by people who have joined the internet revolution are looking for ways to get the correct type of visitors to their site.
SEO is a vital part of any website these days, and with expressions like “Having your website on the front page of Google is like having a store on Oxford Street” everyone is trying to get a piece of the action. And one big cloudy issue that seems to keep swinging from side to side is URL rewriting, and many web developers are getting confused with what Google says about dynamic URLs vs. Static URLs.
With Google’s most recent blog article about this issue they have mentioned that they have changed their policy when it comes to dynamic URLs, before Google would not index anything past the question mark of a dynamic URL, but now they do accept it and are saying that with a dynamic URL it is possible for them to get more information from a web page; this is where most web developers get confused as this blog post is directed at the less savvy web masters in order to protect them from harming their websites stats, but Google failed to mention this is the post and has left most people in search of whether or not to go ahead with URL rewriting.
But before you make a decision about doing URL rewriting to switch from dynamic URLs to static ones, you need to be sure that the benefits outweigh the costs and that you make sure you keep the entire website consistent.
The Pro’s and Con’s
You have to consider the pro’s and con’s of rewriting your websites URLs and make sure that the pros outweigh the cons, below are some of the pros and cons of dynamic URLs and static URLs that have been rewritten from dynamic ones.
Dynamic URLs Pros & Cons
- Con: Having dynamic URLs exposes the underlying technology such as article.php?id=34 shows that this page is built in PHP.
- Con: Dynamic links do not give users any idea of what the page contains.
- Con: Dynamic links are harder to remember than static links.
Static URLs Pros & Cons
- Pro: In a rewritten static URL you can add keywords pertaining to what your article or page is about helping in your Google ranking for a particular keyword or phrase.
- Pro: A static URL looks much nicer than a dynamic URL and can be made much cleaner article.php?id=23 can turn into article/article-name.
- Con: If done incorrectly will be messy and be bad for rankings.
- Pro: Static URLs are easier to remember than dynamic ones.
- Pro: Rewriting a dynamic URL to a static one hides underlying technology such as PHP or ASPX giving added security to a website.
The bottom line is that URL rewriting is not essential as Google indexes pages with dynamic URLs as long as they are not generating duplicate content, but although Google prefers static URLs to dynamic ones they recommend that you do not do it unless you are comfortable doing it and will do it properly. Otherwise, it can hurt your rankings if done incorrectly. For those who do it properly, URL rewriting can make your site more SEO-friendly and also make your URLs more user-friendly.
Read Full Post »