So you’re looking for a way to fix the Ezoic origin error that happens when you integrate Ezoic into your website. I was struggling with that error for months, with frequent talks with Ezoic and my hosting provider’s support, and no one could figure it out.
Well, I might have found a solution. After what I tried, I haven’t run into the issue at all, and my website even loads faster than it did before. Of course, there’s a chance it won’t work for you, but it might point you in the right direction.
What’s frustrating about the origin error is some times it will completely stop your website from loading (show you the error and that’s it) and other times it will load but very slowly. It’s very random, to say the least.
When you’re having origin error problems, your website might:
- Display “Origin Error” in-text in the top left corner.
- Ask you to solve a CAPTCHA
- Connection timed out
- Takes obnoxiously long to load
In most cases, the problem happens because there’s a mismatch between your host’s and Ezoic’s SSL certificates or DNS records. But how do you find what’s wrong? Continue reading!
Note: I recommend reaching out to Ezoic’s support center. In most cases, they can help you narrow down the issue, it could also be caused by a misconfigured DNS record. I had lots of back and forward with their support. You’ll also need to contact your host’s support.
What is Ezoic?
Ezoic is often confused with an ad network but it’s more like an AI ad-management platform. When integrated with your website, it displays and optimizes ads for maximum revenue. In other words, it’s an easy way to make some extra money from your website.
There are certain requirements to join but most small websites can reach the minimum required traffic and be accepted. I’ve been using Ezoic on my website for a few months now and the experience has been pretty good.
The only major issue was the origin error which I seemed to have fixed. Sign-up to Ezoic here to start displaying ads and earning more from your website. But I digress.
How My Website is Integrated with Ezoic:
Ezoic has a few ways to let website owners integrate their websites into the platform. I originally used the Cloudflare option but the origin error was common there too.
Hoping the problem would go away, I switched to the nameserver option, which didn’t work, either. However, I’m still using their nameserver option which seems to be working okay, after I fixed the Ezoic Origin error.
My Website Settings:
What I Tried (Didn’t Work):
As someone who regularly writes for his website, it’s rage-inducing to be unable to login and work on a post. Not to mention the potential revenue you’re losing because people can’t even access the website.
After a particularly bad experience (none of my pages would load) I reached out to Ezoic’s customer support (for the third time) and we tried to figure out the issue.
To be clear, Ezoic’s support was quite helpful and they helped walk me through some possible fixes for the Origin error. Unfortunately, I seemed to have a freak case because nothing worked.
Ezoic has a tutorial on how to fix origin errors, but as is my luck with most things, none of those fixes worked for me. But they can work for you depending on how your host manages your website’s traffic.
Speaking of hosting things, take a look at these best dedicated servers for Valheim!
1 – White-List Ezoic’s IPS
For example, the main solution is to add a text file of Ezoic’s IP Addresses to your host to whitelist. Some hosting companies let you bulk white list IP addresses and that seems to solve the origin error for most people. However, Hostinger, my host, does not allow bulk IP whitelists.
My host lets you manually add IPs, which I started to do, but quickly gave up because there are probably close to a thousand to white-list. No thanks!
2 – Set up X-Forwarded-For Header
A suggestion from Ezoic is a code you add to your WordPress website to help your host identify the traffic. I followed the guide and it seemed to work for a bit, but the problem came back, and I was locked out of my website. There’s an easier way to add this code too, which I’ll talk about in a second.
I tried lots of other configurations too, including switching my integration methods around and tinkering with my host’s settings. I even reset all DNS records and reconnected my website to Ezoic which didn’t work. So what did work?
Fix Ezoic Origin Error Solution (Solved!):
Here’s what really fixed the Ezoic origin error for me. The steps will vary depending on your hosting provider. It seems like people who use my hosting company, Hostinger, struggle with this problem more. And here’s what you can do. These steps assume you’re using Hostinger and you already integrated with Ezoic.
P.S. I spent far too long researching this issue which seems very specific to Hostinger. What I found below seems to work for me, please let me know if it works for you too. It might not work for you, but it’s worth a shot anyway.
1 – Select Flexible and Disable “Force HTTPS” on Ezoic
The easiest way to fix the Ezoic origin error is to change Ezoic’s SSL settings to Flexible and disable automatic HTTPS redirect because HTTPS redirect will be forced by default on your domain name.
For most people, that solves the Ezoic origin error issue. If it doesn’t, you can try the opposite, or some other solutions, which I’ll explain in the next section. The reason you don’t need to force HTTPS to redirect on Ezoic’s end is that your host already does it, at least Hostinger does. Having two sides trying to force HTTPS might be what’s causing the origin error.
This brings us to the other solution:
2 – Disable Force HTTPS on Your Host’s Side
If you keep running into the error, here’s something else to try. Disable Force HTTPS on your Hostinger domain. Log in to your Hostinger and click “Manage” on your hosting account. Scroll down to the “Advanced” section and click on “SSL”.
From there, you’ll see the SSL certificate is installed and you’ll have some options. I turned off “Force HTTPS” and then went to check the Ezoic side of things.
Bear in mind, if you already connected to Ezoic, Hostinger won’t let you re-install the SSL on the host side because it thinks your domain is pointed elsewhere (Ezoic’s nameservers). That’s actually not what’s happening (Ezoic is a proxy) but it’s what Hostinger thinks. There will also be an option to re-install the SSL but it won’t work.
Change to “Flexible” SSL on Ezoic
Log in to your Ezoic account, click on Settings, scroll down until you find SSL, and click edit SSL settings. From here, switch the SSL type to Flexible and make sure automatic HTTPS redirect is turn on.
These settings will probably take up to 24 hours to change, so you still might get the error within that time window. I tried changing the SSL type back to Full or Strict and both those give the origin error, so it only seems to work on the Flexible configuration (and Hostinger’s Forced HTTPS OFF).
After The Changes: (Host SSL OFF, Ezoic Redirect ON)
If everything works properly, the Ezoic origin error will stop interrupting your work, and your website will load faster. But after you make the change, you might notice this warning when you visit your website:
The notice will show your IP and ask you to delist it. I ran into it a couple of times, but after clicking delist, it goes away. If you access the website from other devices, it might show on those because those have a different IP address. It usually happens right after you change it and then stops, it won’t happen every time or for everyone.
I only ran into this Captcha when I used the configuration in this section, the host’s SSL OFF and Ezoic redirect on. It did eliminate that origin error though. I think it would be better to try the first fix though, SSL Flexible ON Ezoic and disabling Ezoic’s HTTPS redirect.
Here are some other ideas:
3 – Reset Everything & Reconnect to Ezoic (I Did This!)
I ended up doing this because my settings were a bit ruined. So I set everything back to Hostinger’s nameservers, hit reset DNS Records on my domain name, re-installed the SSL, changed nameservers back to Ezoic, pulled the Ezoic SSL from my domain name, changed Ezoic’s SSL to flexible, and disabled Ezoic’s HTTPS redirect. Phew!
The good news is it all reconnected pretty fast, within minutes. If I had to guess, it changed fast because Ezoic already has the records. I’ve been using my website with that configuration for a while now and I haven’t run into either the Ezoic origin error or the WordPress “The response is not a valid JSON response.” error either.
Hopefully, it stays that way! In other words, I’m using the first solution in this list.
4 – Install WordFence WordPress Plugin
I’m not sure if this helped, but it has an option that can fix the issue. Besides, it’s a good free security WordPress plugin for your website. It helps block blunt-force password hack attempts and other common website attacks.
To install WordFence, log-in to your website’s WordPress dashboard, head to plugins, search for WordFence Security, install and activate it.
Once activate, open the plugin’s options menu (you’ll have to run through a quick first-time setup) and click on All Options. Scroll down and look for “How does Wordfence get IPs” and select “Use the X-Forwarded-For HTTP header.”.
Remember, that’s the same code that Ezoic recommends adding to your WordPress website. It seems like the WordFence plugin is an easy way to add it. Clearing the website cache and cookies can help too.
5 – Whitelist Your PC’s IP in Hostinger
Since the Ezoic origin error mostly happens on the admin side, what you can try is to add your computer’s IP to your host’s whitelist. It’s pretty easy. Here’s what you need to do:
Login to Hostinger Dashboard, click on your host’s main directory, and scroll all the way down until you see this “Other” section:
From there, select IP Manager, and you’ll see the section to either allow or block IP Addresses. If you don’t know what your IP address is, you can Google “What is my IP” and it will show you. Copy and paste your IP into the allowed category and leave a note like “MY PC” then hit allow.
A quick note about this. If you’re on a dynamic IP, which most ISPS give you by default, your IP will likely change from time to time. I recommend contacting your ISP and asking for a “FIXED IP” that way your IP will always be the same. It’s also easier for port-forwarding and things like that. They should configure it for free, or a small fee.
And if the fixes above don’t work, you can use this section to manually add all of Ezoic’s IP addresses which will take a long time.
Other Possible Fixes:
Double Check DNS Records Match
Some times this error happens when there’s something missing from the DNS records on one end, either your host’s or Ezoic’s.
Normally Ezoic will pull all the records but some times things can get lost. Hostinger won’t let you edit the DNS records because it thinks Ezoic is managing them but you can still find a copy in the Advanced section of your hosting panel in DNS Zone Editor.
From there you can either manually check if the records match Ezoic, or reset the DNS settings to default. You might need to manually add or remove a DNS record on the Ezoic side.
Uninstall Unnecessary Plugins
It could be possible a plugin is causing the issue too. To work on that, disable plugins one at a time to narrow it down. If you can’t access your WordPress dashboard because the error is blocking you, you’ll have to delete the plugin files from your hosting file manager.
Delete Cookies & Flush DNS
Another thing to try is deleting your site’s cookies and cache, and flushing your computer’s DNS. Whenever I did that, it fixed the Ezoic origin error for a while. It’s more of a temporary fix because it usually came back, not after I did the disable force HTTPS on the host’s side though.
To clear the cookies on Chrome, open the three-dot menu in the top right corner, click Settings, then Privacy and Security, and finally Cookies and Site Data. Scroll down to See all Cookies and Site Data, type in your website’s name, and click the recycle button.
To flush the DNS, open CMD, and type ipconfig /flushdns and press enter. So that’s how you fix the Ezoic origin error. I know how annoying the error can be, especially when it gets in the way of your website’s earnings and blocks you from working on the site.
If you disable automatic HTTPS redirect on both the host and Ezoic, the website will work for about 30 minutes, until it gives you an “SSL certificate invalid” error, and nothing will load. In other words, one end has to have redirect enabled.
I recommend leaving HTTPS forced on the host and disabling Ezoic’s automatic redirect. It does work in reverse too, I tested it, but you might run into that anti-robot Captcha from time to time.
Please let me know if it works for you, I’m pretty happy that it works for me. There’s a chance it might not work for you, but it can point you in the right direction. Most of the time, the error is caused by either an issue with the SSL or DNS records. Thanks!