Question

Subdomains and SSL for Ecommerce

Asked by: rowejd

I need to set up an ecommerce site that looks like this:

Home page will re-direct you to your local "store".  All stores will have the same basic products and lots of the same information.  They'll use the same web programming I write to control most of the layout and functionality.  

So I want these "sites" to really just be one site with different sub-domains for each store.  Because each "store" represents a different dealer located in a different geographic area, they all want their own domain names.  It being an ecommerce site, when they check out, I'd assume they all need an SSL cert.

I don't know much about SSL and the different types of them.  Would a wildcard work for this even though it's different domains all on the same IP address?  I'm using cPanel, if that matters.

What's the best way to get this done?  I don't really want it to be separate sites with separate IP's because of the extra cost involved, but need to know if that's necessary?

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-09-23 at 13:51:33ID24756541
Tags

ssl

,

apache

,

cpanel

,

domains

Topics

Secure Socket Layer (SSL) & HTTPS

,

Apache Web Server

,

E-Commerce

Participating Experts
2
Points
500
Comments
15

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. eCommerce
    I may soon be getting involved with a project which will involve setting up an online ordering system. What are the steps one must go through in order to set up a site to accept credit card purchases (in terms of certificate purchasing, merchant accounts, etc.)? Id apprecia...
  2. eCommerce
    I am starting to understand bit of asp and web dbase, i am asked about eCommerce and how it works, do I have to subscribe with someone for it, or can i develop my own in vb6/vbScript, so someone tells me an idea how it works and where can i start? many thanks
  3. eCommerce?
    I need a simple eCommerce package that has a shopping cart, merchant account, gateway... in other words a complete turnkey service all in one with no hidden costs or hidden services. I would prefer a company in the U.S.
  4. ASP with Ecommerce
    I am interested in building an Ecommerce website. I want to use ASP to store all of the information gathered from the site in an Access Database, such as contact information etc. Plus, i want the site to have the ability to process credit cards and check information. Once t...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: ahoffmannPosted on 2009-09-24 at 02:18:21ID: 25411296

You either need a wildcar SSL certificate, or each domain needs its own certificate.

If they all share the same IP, it would also be possible to assign the IP to the certificate. But that would require, that you call the web pages using the IP instead of the domain name to avoid the browser complainung.

About wildcard certificates: I would never trust a web site using a wildcard certificate, 'cause it might be possible that someone sets up a domain like
  a-hostname-for-attacker.yourdomain.com
which contains malicous data or code. All browser would then silently accept any data from there and not complain about trusts.
Just my 2 pence about wldcards.

 

by: rowejdPosted on 2009-09-24 at 05:07:25ID: 25412350

>>You either need a wildcard SSL certificate, or each domain needs its own certificate.
But could each domain have its own SSL cert but still be on the same IP?  Or is that an impossibility unless you call them using the IP as you mention (which I would not want to do).

Would a wildcard still work if I'm not doing subdomains like "a-hostname.yourdomain.com" and rather using "foobar.com" resolves to "mysite.com/foobar"?  I see that this is possible in the cPanel setup, but don't know how this would affect SSL.

>>I would never trust a web site using a wildcard certificate
Yes, but you're a sage  ;-)  Would others even notice?

>>It might be possible that someone sets up a domain like 'a-hostname-for-attacker.yourdomain.com'
What if I'm the only person administrating the site and have control over all the contents?

 

by: ahoffmannPosted on 2009-09-24 at 05:25:14ID: 25412482

> Yes, but you're a sage  ;-)  Would others even notice?
what should a certificate be worth for, if the user is not able to see/identify its value?
Why not writing "everything is secure, don't worry" on your page, it's the same placebo then ;-)
Ask yourself: would you trust if someone presents the printed copy of her passwort with expiration date in 42 years?

> .. could each domain have its own SSL cert but still be on the same IP?
right and wrong
Traditional web servers and SSL are not able to handle multiple certs on the same IP (for example apache's virtual host). There're changes in the SSL/TLS protocol which allows that (sorry, no link handy).

> Would a wildcard still work if I'm not doing subdomains like "a-hostname.yourdomain.com"
yes

> ..  using "foobar.com" resolves to "mysite.com/foobar"?
certificates are for FQDN, mysite.com/foobar is a URL (including a path). Paths are not covered by certificates, only the host.
Maybe this is a acceptable solution for your problem: use paths for each store, but the same FQDN for all, something like:
  store.your.tld/bookshop/
  store.your.tld/gameshop/
  store.your.tld/magic/
...


 

by: rowejdPosted on 2009-09-24 at 06:10:04ID: 25412908

When I said above using foobar.com resolves to mysite.com/foobar I don't think I explained well.  I meant that foobar.com is set up in cPanel as a subdomain.  You have to tell cPanel in which directory the subdomain contents reside - which would be mysite.com/foobar or mysite.com/foobar.com  So that in the address bar you see foobar.com even if contents is in the mysite.com/foobar/ directory.

So my question was - can subdomains that are set up like this - that actually are completely different domains but on the same account - still use a wildcard cert?

Here's a bit better of an explanation of exactly what I'm trying to accomplish, and perhaps you can tell me how you'd proceed.  I'll leave you alone after this and REALLY appreciate your help here!  You rock.

A manufacturer sells widgets.  He has distributors all over the US that sell the widgets he manufactures.  The manufacturer wants a site where he can sell these widgets in geo-areas that don't have a local distributor. But he wants sites built for all his distributors to sell the widgets too.

They'll all share the same layout with only the logo area changing (and obviously some back-end functionality).  So it makes sense to me, in order to share images, css files, javascript, templates, php stuff, etc. - that they'd all share the same vhost account so that one change will change everyone's and we're not having to constantly update 25 different distributor sites with things like small shifts in layouts or a change in the template or programming stuff.

Function-wise, it'd be fine to have them at widgets.com/florida, widgets.com/tennessee, etc.

However, since distributors are doing in-person sales, they will want to give out business cards that say "floridawidgets.com" and wouldn't necessarily like being widgets.com/florida.

For the most part everyone sells the same thing and I have no problem building the controls.  But it makes sense to me to have everyone on the same vhost account so they can share css files, javascript files, php includes, template layouts, images, etc -- so that one change will change everyone's and we're not having to constantly update 25 different distributor sites.

One final thing to consider is you'll have to excuse my ignorance with terms like vhost and anything apache.  I've never been trained in server admin stuff which is why I can build a complex program, but not have a master's understanding of things like ssl & apache.

So the options as I see it are these, and I'd love for you to either correct me, tell me which you'd use, or suggest something I'm not thinking of that you would do if this were your project:

--Tell the distrib's to get over it and just redirect floridawidgets.com to widgets.com/florida
--Use a wildcard cert and hope that most folks don't check
--Use different hosting accounts and give myself migraines on a daily basis updating everyone's sites

Again thanks SO much for your help here.  Points are yours, I just need a last bit of direction/understanding.  ;-)

 

by: rowejdPosted on 2009-09-24 at 06:15:06ID: 25412960

Oh and one other consideration - each distributor would need the funds put into their account.  Just in case you were thinking perhaps of a shared checkout (which may still be an option in some way I'm not considering) --- if you buy a widget from the florida distributor, the money would go through his merchant account and not the distributor's.  So we're talking 25 different gateways, too.

 

by: ahoffmannPosted on 2009-09-24 at 07:06:35ID: 25413474

> .. o give out business cards that say ..
then they should have the money to buy their own cert, otherwise it's no business (or just monkey business:-)

Anyway.
the SSL extension I mentioned is: TLS Servr Name Indication (SNI)
and can be found here:
http://www.ietf.org/rfc/rfc3546.txt
http://www.ietf.org/rfc/rfc4366.txt

OpenSSL compiled with a special extension does support it. Hence all web servers using OpenSSL should support it too. For an apache example see:
https://sni.velox.ch/

If you have apache, then you can configure virtual hosts for each subdomain where they all share the same IP. If the browser then also supports SNI (see above) then you're done.

(I'm not talking about the vulnerability traps you get with name-based virtual hosts:)

Hope this helps.

 

by: rowejdPosted on 2009-09-24 at 07:20:28ID: 25413609

It's less about the money to buy their own cert and more about sharing a system as I described.  It's about me managing everyone's site by making changes to one thing rather than to 25 different css files or php scripts.  Many of the customers would have ie6 or windowsXP which all seem unsupported.  So your answer is -- if the TLS / SNI thing isn't going to work -- to have separate accounts/ip's / certs?

 

by: ahoffmannPosted on 2009-09-24 at 07:37:06ID: 25413768

oops, I assume you misunderstood my technical description, at least partially, and also my jokes ;-)

Anyway, I'll try again:
 You have a bunch of data, html file, scipts, images, whatever which are (should be) common to all of your clients (which each wants his own subdomain).
 Based on that, the technical solution would be to setup name-based virtual hosts, one for each subdomain, where they all use the same DocumentRoot directive (speaking in apache's httpd:conf terms).
  This should solve all you organisation problems like editing one css only which is (virtually) used on 25 doomains. Right?

The problem you have is with SSL, as name-based virtual hosts do not work with SSL out of the box 'cause the web server (apache, the httpd process in particular) has no idea which FQDN was used by the browser as this information is only available in HTTP which is a application level protocol protected by SSL.
This is a design problem in SSL. But there exists a workaround based on new RFC (see previous links) which allow the browser to use an attribute in the SSL protocol to pass the FQDN which then can be extracted on the server (apache) to identify the real host (virtual host in apache).
If that workaround -SNI - Server Name Indication- is implemented in the server, then you can have multiple unique certificates for the same IP. If the browser also suppports SNI, then this browser will be connected to the server specified by the FQDN.
Again, the workaround is SNI, which makes name-based virtual hosts possible with SSL, which otherwise would not work.

 

 

by: rowejdPosted on 2009-09-24 at 07:42:49ID: 25413840

I think I'm with you now.  But in the documentation you provided, it mentioned that lots of browsers won't support SNI - such as ie6 and any ie on Win XP -- which seems like there's still enough users to be concerned about.  Am I off base?

 

by: ahoffmannPosted on 2009-09-24 at 07:49:32ID: 25413936

you're right
So you get a cheap solution loosing users/customers not willing to pay for new software.
Or you pay per cert and an IP per cert, collecting cheap users too ;-)

Just an idea:
  if the content is the same anyway, and you want to support ancient browsers, how about setting up a default doman which then automatically gets all these users 'cause apache uses the first configured virtual host for SSL if SNI does not work.

 

by: rowejdPosted on 2009-09-24 at 07:59:16ID: 25414038

haha, well sometimes it has more to do with age or ignorance of target end-market than with cheapness.

>>Or you pay per cert and an IP per cert...
Speaking of ignorance...lemme ask an ignorant question.  I'm not worried about this cost if it's needed -- but is this possible to apply with everyone still sharing the same docroot?

Thanks again for the help.

 

by: ParanormasticPosted on 2009-09-24 at 08:11:44ID: 25414172

Subdomains do not work with wildcards.  You would need multiple wildcards or a multi-domain (SAN) certificate to host each name, which would need to be updated with each new addition.

Wildcards work this way:
*.domain.com:
site1.domain.com
site2.domain.com
anothersite.domain.com
customer1.domain.com

it would not work for:
site1.customer1.domain.com
site1.domain2.com

For the subdomain above, you would need *.customer1.domain.com

Another option is that you use one site and then use different virtual directories for each customer, keeping security in mind while setting up each virtual dir.
secure.domain.com/customer1/page.htm
secure.domain.com/customer2/antoherpage.htm

These would only require a standard SSL cert - not a wildcard - for secure.domain.com.  You could use a wildcard as well if you wished.

If you're using cpanel you are probably using apache.  Apache is a bit more configurable so you can point to a specific cert within each site's config, even on the same IP address.  IIS is not so giving in this area.  That could be a shared cert, or it could be a customer-specific standard or wildcard SSL cert, depending on need.  If you can get just one or two names to worry about, then you should be able to use standard ones to keep costs down.  Since is a store portal, you might consider getting an EV (extended validation) cert - those are the ones that turn the address bar green (e.g. paypal).

 

by: rowejdPosted on 2009-09-24 at 08:39:33ID: 25414507

ahoffman has been patient and answered so much that I need to go ahead and award points.

Here's a link to a new question i just added to continue with new questions that have arisen out of this:
http://www.experts-exchange.com/Networking/Protocols/Application_Protocols/SSL/Q_24758860.html

 

by: rowejdPosted on 2009-09-24 at 08:39:57ID: 31632688

Thanks!

 

by: ahoffmannPosted on 2009-09-24 at 10:44:54ID: 25415815

> is this possible to apply with everyone still sharing the same docroot?
yes (apache virtual hosts, wether name- or IP-based, can do that)

> .. use one site and then use different virtual directories ..
Paranormastic, that has already been discussed and was not an option (due too cheap business card, IIRC;-)

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...