Jump to content

[Solved] SSL and multiple domains


Recommended Posts

Hi there,

I am looking into using the offline credit card module and setting up ssl. I can get a personal ssl with a dedicated ip from my web host. I understand that for the certificate I have to set up either http://www.domain.com or http://domain.com, on which there are a number of threads here, so I'm not too worried about that.

However, I have two domains, a .com and a .co.uk. I will point the second domain to my website so that both domains open the site, but I assume that this will cause problems when you get the the payment page as the certificate is just for one of the domains. To avoid having to purchase and run two certificates is there a way to make sure that the payment page (and whatever other pages are protected by ssl) uses the only the certified domain?

I suppose I could do a redirect when a visitor comes via the second domain, but I'd rather not do that. Any suggestions?

I hope that all makes sense! I can't be the only person out there with more than one domain.

Thanks in advance,

Lisa

Link to comment
Share on other sites

babyewok,

What domain is PrestaShop installed on? When you browse to the domain without prestashop installed, the URL would change to the domain WITH prestashop installed, so you shouldn't have to worry about redirecting to the secure URL on checkout.

Link to comment
Share on other sites

  • 1 month later...

Hi there, now that the site is up and running, I can see that this isn't working. The .co.uk domain is parked to the .com domain. When you visit via .co.uk, you stay with .co.uk which brings up errors about the ssl certificate.

Link to comment
Share on other sites

  • 1 month later...
Hi there, now that the site is up and running, I can see that this isn't working. The .co.uk domain is parked to the .com domain. When you visit via .co.uk, you stay with .co.uk which brings up errors about the ssl certificate.

Came across this post as I was searching for something else. Did you get this sorted? If your domain host allows you to use URL rewriting, try the following in your .htaccess:
RewriteEngine on
RewriteCond %{HTTP_HOST}   !^your-domain\.com [NC]
RewriteRule ^/(.*)         http://your-domain.com/$1 [L,R=permanent]


You might not need the first line. This should redirect anyone coming in from your-domain.co.uk to your-domain.com and change the URL in the address bar from .co.uk to .com. The above was cobbled together from http://httpd.apache.org/docs/2.0/misc/rewriteguide.html (I had a need to do the same recently).

HTH

Link to comment
Share on other sites

After a bit of researching (and not wanting to pee Google off) I had actually come up with a similar solution:

Options +FollowSymLinks 
RewriteEngine on 
RewriteCond %{HTTP_HOST} mydomain.co.uk$ 
RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L]



Thanks for your reply anyway.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...