Keyvan Nayyeri

God breathing through me

SSL Certificates and WWW. Prefix on Domain Names

Photo taken from http://www.rosehosting.com/images/ssl_lock.jpg Older readers can remember my post in the latest days of 2006 that showed how to implement a simple HttpModule to eliminate the “WWW.” prefix from domain names in ASP.NET applications to have unique and shorter URLs for all the pages on a site. Later in 2007 I also wrote a separate post emphasizing on some techniques to simplify URLs on a site and discussed why this technique should be considered by developers in their web applications, and how to use some common mechanisms to accomplish this goal.

Generally, I’m a big advocate of URLs without “WWW.” prefix which is something being supported by many developers out there (Telligenti’s are one of them), and there is also a site dedicated to encourage all developers and webmasters to avoid this ugly prefix in order to to shorten their URLs.

Yesterday and early today Steven Smith and Rick Strahl started a Twisation (the replacement term for “Twitter Conversation” founded by me!) talking about the necessity of that “WWW.” prefix on URLs or not. Steve is also an advocate of this idea, but Rick introduced an issue with SSL certificates as a downside for dropping the prefix. Later I jumped in and continued the discussion with Rick to a point that I thought may be worth sharing for everyone here. I just try to put it together in a single post, so everyone can benefit from the summary and hopefully eliminate that prefix from his URLs.

The problem that Rick had talked about was the fact that when you generate a SSL certificate, you need to enter the domain name and SSL will be valid for that specific domain name, so if you register for a domain with “WWW.”, then you cannot use it without the prefix. In this case you should retrieve two separate certificates for each domain which costs money. Besides, some providers don’t allow you to choose between having the prefix or not, so they automatically generate the certificate name with “WWW.” and things go beyond your control.

As a side-note for those who don’t know what the problem is, if you navigate to a site hosted on secure layer but the SSL is associated with a different name, then you receive a SSL error that you should have seen many times to now. This can be distracting for many clients specifically for more sensitive sites. An example is Rick’s West Wind domain without “WWW.” that generates an error in browsers because the original certificate is issued for a domain name with “WWW.”.

Let’s get back to the original issue. You should know that there are two general types of certificates issued by providers on the web: normal certificates and wildcard certificates. Normal certificates are associated with a specific domain name and cannot be used with sub-domains of that domain, but wildcard domains cover the whole domain and sub-domains as *.domain.com and can be used to secure all parts of a single site. Anyway, wildcard certificates are comparatively more expensive than normal certificates. By the way, I didn’t know about the existence of wildcard certificates and their differences with normal certificates until today!

But what can you do if you don’t want to spend more money on wildcard certificates? In this case you can work with some certificate issuers that are more honest and automatically generate the base domain name when you request a SSL for your domain. I use GoDaddy certificates that are comparatively cheap. One of the important advantages of GoDaddy that I wasn’t aware of is that they generate a certificate for your sites that works with and without “WWW.” prefix without any extra charge and in the single original certificate. To showcase this in action, I disabled the automatic redirects of requests on Waegis, so for a short while you can check out the registration page URL with and without the prefix. I got this SSL for a very cheap price and it’s a single normal SSL, but it works fine in either cases. I think that there are some other providers that do this as well, but there are also some providers that will charge you for these four extra characters! I think this simple point can be a good factor when considering to choose an issuer.

Therefore, to summarize the solutions, I can say that you can use a wildcard certificate or issue two separate certificates that both cost money and may not be a good option for many cases. You can also look for a SSL certificate issuer that automatically includes the base domain name when you generate one for the domain name with “WWW.”.

In the end I would say that I’m not such an expert in this field, so there may be other/better solutions that you can kindly leave as comments for this post. You may also want to let others know if you know an issuers that automatically includes base domain names in its normal certificates.

17 Comments

Steve
Jan 14, 2009 5:25 AM
#

This is a default feature, browser will accept all registered ssl domains with a www. prefix.

So if you register test.domain.com it will also be accepted as https://www.test.domain.com


Keyvan Nayyeri
Jan 14, 2009 7:08 AM
#

@Steve

Are you sure? If yes, why it doesn't work in that way for many sites?


Steve
Jan 14, 2009 7:24 AM
#

Sorry, seems I was wrong, at least Chrome doesn't behave this way. I've probably always got ssl certificates that gave me both.


Tim Laughlin
Jan 14, 2009 7:54 AM
#

Great topic and insightful comments, Thanks Steve. I have had this topic occur with multiple clients. I personally still prefer www. I guess I am old school. Thought now a days many clients have more than one web resource under their domain. like community. ; store. . So www starting to make sense again. Of course no www should resolve to the www site. Nice to know the browsers are keeping pace.

On another note like you I have switch to GoDadddy certs purely on price. The big names are pricing themselves out the market.


Tim Laughlin
Jan 14, 2009 7:57 AM
#

Well, new comments while I was writing. I guess GoDaddy has a nice unpublished feature at a still discounted price.


Keyvan Nayyeri
Jan 14, 2009 7:59 AM
#

@Tim

Yes, as I wrote, it was something that I noticed today when I was examining this problem.


Mohammad Mahdi Ramezanpour
Jan 14, 2009 12:05 PM
#

I believe so because, I hate URLs with "WWW." and think it's a great topic to discuss more about.

It seems companies are working on URLs without "WWW." and in my opinion, ASP.NET official website is a good example.

If you check it without the "WWW." (http://asp.net), it will redirects you to www.asp.net/.../default.aspx

My thought is that they're counting users who're using the "WWW." and those who're not. So maybe they want to make some decisions about it.

Anyway, Thanks for the post.


Keyvan Nayyeri
Jan 14, 2009 1:09 PM
#

@Mohammad Mahdi

Yes, it looks like that asp.net webmasters are collecting some data around this.

Btw, URLs without "WWW." is strongly encouraged and make more beautiful URLs. Prior to this, they had some SEO advantages but search engines have improved this area recently.

Pingback from Dew Drop - January 14, 2009 | Alvin Ashcraft's Morning Dew


Ronald S Woan
Jan 15, 2009 4:27 PM
#

I also think of www as a homage to the origins of the web.

I do purchase wildcard certs for commercial properties I am responsible for. They aren't much more than 2x regular certs last I purchased from godaddy.


Keyvan Nayyeri
Jan 16, 2009 4:13 AM
#

@Ronald

I would disagree, though. Thinking about "WWW." as a homage is a very strict way of thinking. I think we should think about benefits and URLs without "WWW." have some benefits (as I have mentioned in this post and others).

But wildcard certificates are not a good option for all the projects. Sometimes you don't want to spend more money on them. That 2x price cannot be neglected for more expensive certificates.

It’s obvious that I’m trying to support the wave of NO-WWW ! A long time ago I had written a HttpModule to remove “WWW.” from URLs. Last year I wrote a post with some topics for simpler URLs in web applications including an alternative solution to accomplish


Jan Mönnich
Feb 04, 2009 5:30 AM
#

please notice that the certificate in the example has two subject alternative names: one for "www.waegis.com" and one for "waegis.com". that are the only two names this certificate will work for and it is not a wilcard certificate :-(

(you can view the alternative names in the certificates extensions)


Keyvan Nayyeri
Feb 04, 2009 5:43 AM
#

@Jan

And you please open your eyes and read the post carefully before leaving your worthless comments!


Jan
Feb 04, 2009 7:41 AM
#

@Keyvan

in deed i haven't read far enough and i will never post here again. sorry for disturbing!


Keyvan Nayyeri
Feb 04, 2009 8:44 AM
#

@Jan

Sorry for my sharp response, but your comment was so far from the point and it was obvious that you hadn't read the post.


Sanjay
Feb 23, 2010 3:10 AM
#

can you please through some light on using a single SSL Certificate for all virtual hosts on a single server

thanks in advance

Leave a Comment





Ads Powered by Lake Quincy Media Network