Website behind basic auth
I'm launching a new website soon, and I wanted to test out my Optimizely integration. But the website is protected behind basic auth, which means that it won't load in the test setup screen. Is there any way to work around this?
Joel Abrams, Senior Product Manager
When you say basic auth I'm assuming you're referring to a login on the site, so a gated experience. If that's correct maybe something in this section might help:
Assuming you don't have a staging site, something else to consider.
If this is a brand new site or a microsite (for marketing lets say) on a pristine domain, unless you've had a super successful holding page up for a few months it's unlikely you'd receive any traffic until you start driving traffic to it. I guess I'm saying you could push it live for a short time with minimal risk if only to test your implementations. Just a thought
**Scratch that last comment, I didn't spot the link straight away.**
Hope that gets you on your way?
Actually, I had tried that technique and it didn't work - I think because the basic auth would need to pass from Optimizely's server to the password-protected server. So I just tested my jQuery in the browser console, and it worked when it went live.
Anybody find a solution for this? We'd like to be able to test experiments on our dev and staging environments that are both protected behind basic http auth.
I tried setting the URL as http://<username>:<password>@develop.mycompany.com/ but are still getting a "Sorry, but we are unable to load..." message. What is the best practice for setting up experiments on servers behind http auth?
I'm still unable to get this to work this way. I've logged into our beta site, that's password protected and created an experiment and I'm still getting
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
Additionally, a 401 Authorization Required error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at beta.mysite.com Port 80