title: Elastic Beanstalk over SSL on Cloudflare
body: <p>I am using ElasticBeanStalk on AWS as part of my Parse environment. The Elastic Beanstalk URL is myparseapp.elasticbeanstalk.com. When a user registers for an account on my site ("www.example.com"), Elastic Beanstalk works its magic. </p>
  
  <p>That worked fine until I enabled SSL on the soon-to-be-production website and tested it. Registration fails, and I see this in the developer console:</p>
  
  <blockquote>
    <p>parse.min.js:16 Mixed Content: The page at
    '<a href="https://www.example.com/register.html" rel="nofollow noreferrer">https://www.example.com/register.html</a>' was loaded over HTTPS, but
    requested an insecure XMLHttpRequest endpoint
    '<a href="http://myparseapp.elasticbeanstalk.com/parse/users" rel="nofollow noreferrer">http://myparseapp.elasticbeanstalk.com/parse/users</a>'. This request has
    been blocked; the content must be served over HTTPS.</p>
  </blockquote>
  
  <p>I understand why I'm receiving the error. I'm not clear on how to resolve it. Everything I read says "register your domain, get an SSL cert, attach a CNAME (www) using Route 53, apply it to the load balancer. Done."   </p>
  
  <p>Well... 1) I already have a domain which is used for my website. 2) My SSL is being served via Cloudflare, which is where SSL terminates. 3) Why would I assign the CNAME 'www' to Elastic Beanstalk when my www.example.com is my actual website? Wouldn't using the CNAME "www" break my site? 4) My Elastic Beanstalk instance isn't behind a load balancer. </p>
  
  <p>Do I need to create a separate domain just for elastic beanstalk? That doesn't sound right. I could see making it a subdomain perhaps, such as parseapp.example.com. </p>
  
  <p>Since I'm using Cloudflare (and I like it), I would prefer not to use Route 53 for this... but if it's my only choice, then so be it. </p>
  
  <p>So, in summary, how do I access my Elastic Beanstalk app over SSL using Cloudflare?</p>
  
  <p>Thank you in advance for any assistance.</p>