Skip to content

Quick Fix for OpenX Redirect Loop

tl:dr Version
Problem is caused by a cookie. Quick fix is to park a different subdomain on top of your OpenX domain and use that subdomain to access admin.

Full Version
Last week I installed OpenX on my server to use for an upcoming project. After getting it installed and setup admin-side, I went and made sure the zones looked right on the project site. Chrome gave me an error that it was in a redirect loop.

It appears this is a very common problem with forum threads all around. The cause is that OpenX uses the same cookie name for both ad viewer tracking and admin logins, a cookie named OAID. Since OpenX is open source I could have dug through the code and either figured out why it was redirecting or changed the cookie name. But I wasn’t really up to that.

Closest thing I found online to a solution was to either clear cookies between using the admin side and checking the production site, or to use two different browsers. Neither a really good solution.

Came up with a better, and much easier, solution.

Since it’s all about a cookie then different domains would be different cookies. So since I had my ad server at ads.example.com I just parked another subdomain adsadmin.example.com on top of the same account and use the adsadmin subdomain to access the OpenX admin pages.

It did take one change under Config -> Banner Settings when logged in as the administrator. I changed the Admin Interface URL to the new adminads subdomain, but left the rest as the ads subdomain.

Now I just login to adsadmin.example.com when I need to work on the OpenX settings and ads.example.com serves all the actual ads.

Got to love the 30 second fixes, even when they come after hours and hours of Googling.

Published inComputers & Internet

5 Comments

  1. @Chris & @Ricardo – Not a problem. This is one of those deals where I spent so much time before finally coming up with a dead simple solution that hopefully posting it here will save somebody else the time I spent.

  2. It’s really works! Thank’s! I don’t know what you wanted to say with “parked another subdomain adsadmin.example.com on top of the same account” all i did is a new subdomain adsadmin.example.com for ads.example.com/www/admin folder. And it’s working! Sorry for my bad english, i’m from Romania.

    • I’m using cPanel, and it uses park as the term to have one domain sit on top of another, both mapping to the same site. What you did works perfectly, and actually might even make more sense since it goes directly to the admin.

Leave a Reply

Your email address will not be published. Required fields are marked *