MMv4 KB
 
Can I put my store in an iframe on another website?
  Last Edited - 07/30/2014 9:09am PDT
  Category Path - Shopping Cart Software Components
 
quote
Can I put my store in an iframe on my main website, and have traffic go through that location instead?

It is possible to do so, and is commonly used as a form of domain masking, but it isn't something that we recommend or encourage doing. In fact, there are a few reasons why you should not display the store in an iframe on another website.
 
The why

Session cookies
When using an iframe on your website, the software is attempting to save session cookies. However, since there are two URLs present on the page, due to the main page and the page within the iframe, most browsers are often (pretty much always) uncertain as to where the cookies should be saved to. This can cause a problem during the shopping process, such as the order data not being retained when going to the checkout page.

SSL issues
Another reason, is that if both websites use SSL protection, the browser can become confused at which one to look at and generate warnings. This could result in the end of the Internet as we know it.

PayPal
Yet another good reason not to do it is if your customers will be checking out using PayPal. If you have the store in an iframe on your website, and customers go through the shopping process and click the "Pay with PayPal" button on the checkout page, you will usually end up with a stuck or blank white PayPal page. This is because the iframe is impairing the store's ability to send the necessary data to PayPal, so it is hanging and/or redirecting to a blank page.
 
Some alternatives

Rather than using the iframe and carrying all the wonderful burdens that it offers, here's a couple alternatives.

Host the store under your own domain/subdomain
We recommend having us host the store under your domain/subdomain name instead. This way you can still show the store under your domain, but that's where it will actually be. The hosting process can be initiated in your Administration Area through [Hosting > Hosting Setup Checklist].

tip
More information about our available hosting options can be found on our website.


Or, try domain forwarding
It is also possible to setup a redirect for your domain in your domain registrar's control panel. This would allow you to setup a redirect for "www.yourdomain.com" to take customer to the store's URL instead. We recommend contacting the company through which you registered the domain name (such as GoDaddy) for more information.
Powered by ModularKB