Over the years, I've been asked frequently by clients, "what is the difference between www vs non-www in terms of Umbraco site URLs?" Most people get confused about which one is 'better' and what strategy they should pick for Umbraco and SEO. In today's post, I'm going to give a brief overview of the issue to help you understand the difference between www vs non-www and which one is better for Umbraco SEO.
What Is The Difference Between WWW and non-WWW URLs?
In case you are new to this debate, the issue is centered around how should you render links on your website. For example, should your links be www.website .com, just website .com, or a mix of both? In terms of SEO, technical wizardry or anything else you can think of, the difference between www vs non-www is pretty irrelevant. The choice between one or the other is a personal preference and even Google has said that it all depends on your preference. The main thing is you pick one and stick to it. You need to stay consistent with your Url strategy from launch. Why is this important? Well, if Google finds two URLs www.website.com/news and website.com/news it will treat the two URLs as different pages and penalize your website in terms of ranking which is sub-optimal. So as long as you pick an approach and redirect when the other is used, life is simple :)
Technical Difference between WWW vs non-WWW
When picking an approach I tend to favor using a WWW approach as you get some minor technical benefits compared to using a naked domain (non-www). Using a www allows more flexibility when restricting, cookies when using multiple subdomains, more flexibility with DNS (here, WWW means a website service, when you use a naked domain you don't necessarily know which service you might be working with. There are no technical benefits of using Non-WWW domains/naked domains. When I make an architectural choice it's usually based in terms of technical benefits, so I tend to stick with WWW unless someone tells me differently.
How To Force www in Umbraco
If you agree with me then I'm going to quickly show how you can enforce WWW Url's within a few minutes using Url Rewrite. If you want a more detailed guide on how to set-up Url Rewrites in Umbraco then I suggest you read, How To Set-up Page Redirects In Umbraco.
As long as you have Url Rewrite enabled on each server, then if you add this rule to your section, your website will ensure all URLs on your website use www.
In today's post, we've covered the still-raging debate whether to go www or not. My opinion (for what it's worth) is that it doesn’t matter which one you use; pick one and stick with it. My preference is using www as it provides some slight technical benefits but if I had to use non-WWW I wouldn't loose any sleep over it.
The important thing is that your website should load regardless of WWW or non-WWW and redirect when necessary. If your URLs don't work then you have bigger issues to worry about. After you make your mind up you can simply use Url Redirect to perform the re-direct. Umbraco does ship with a redirect mechanism but from my research and experience this can cause performance issues, so it's best to stick with tried and tested Microsoft software.