Ezoic is a certified AdSense partner that uses machine learning to optimize sites for the best revenue by testing different ad layouts and positions.
For Ezoic to do this, one has to integrate their site onto their platform using either a script or at the DNS level. I went with the latter and had no issues with the platform other than taking a hit traffic wise in the first few months after integration.
That’s until earlier this month when by chance I noticed the naked (root) domain of my blog wasn’t redirecting to the WWW version. To make matters interesting, while the insecure HTTP version wasn’t redirecting (returned a 404 from Google) the HTTPS version was returning an Origin Error.
If you’re wondering why the 404 was coming from Google rather than from my site,
it’s because this blog is using Google’s Blogger on a custom domain. (I’ve since migrated to WordPress)
While all this wasn’t a cause for major concern, after all my preferred domain in Google Search Console was set to use the WWW version, I knew I had to fix this immediately for the sake of the few visitors that visit my blog directly.
Tracing the Problem
I was certain that Ezoic was behind the error so I checked their help pages and sure enough I found a help page that touched on the origin error and how to resolve it.
However, none of the fixes mentioned there would work with my Blogger hosted blog, so I contacted my account manager for help. She contacted their tech team about the issue and later replied that I had to resolve the redirection issue on my end before they could look into the Origin error.
I was stumped by this turn of events. Nevertheless, I decided to first take a took look at the SSL settings in Ezoic. In the app I noticed there was a setting to redirect the HTTP traffic to HTTPS that was turned off.
Since I had Blogger redirecting to HTTPS in its settings, I thought I should do the same here. Unfortunately, that resolved neither the redirection nor the origin error.
My next stop was the Third-party domain settings in Blogger where for some reason I found the redirection to the WWW version had been turned off.
When I tried to turn it back on I was yet again met by another error. Apparently, Google could not verify ownership of the domain I was using.
That prompted me to check the CNAME and A records that are needed to point Blogger to my custom domain. These records were however no longer being hosted in my domain registrar (Namecheap) since changing my Nameservers to those of Ezoic.
I had overlooked this detail during the integration with Ezoic and up until now had never verified the DNS records Ezoic had imported. So I looked into the DNS Manager available in my Settings Dashboard and as I had suspected, Ezoic had not imported one of the unique CNAME records that’s required to verify my domain ownership.
Fixing the Redirection Error
Knowing I had found the culprit, I added the missing CNAME record into the Ezoic DNS Manager and wait to see if the redirection would work.
It didn’t though I presume this was because the DNS records were taking longer than usual to take effect. Fortunately, in the meantime I could also reverify my ownership of the domain using a TXT record via Google Search Console.
I did that and 30 minutes later the reverification was successful. Finally, I could save the redirection settings.
Unfortunately, the redirection failed once more. However, the 404 error from Google had gone away and the naked domain in HTTP was now redirecting to the naked domain in HTTPS and then returning an Origin Error.
Fixing the Origin Error
Remember the HTTPS redirection I activated in Ezoic? That option was the one behind this new redirection. I turned it off and just like that the redirection to WWW started working again. Gone also was the accompanying origin error.
My blog is now once more working as intended: both secure and unsecure naked domain is redirecting to the secure WWW version as it used to do before.
The bottom line here is that if you’re experiencing the origin error you may want to check the redirection and DNS Settings for your domain.