© 2020 Ezoic Inc.
What is an Origin Error?
An Origin Error occurs whenever the origin server isn't providing the site to Ezoic's servers as expected. There is no one single cause of an origin error - for example, it may simply be that the site is down at your host, in which case Ezoic won't be able to directly help. However, if you're in the early stages of Ezoic integration and experience an origin error, this may because your host has miscategorized Ezoic traffic, as explained below.
When you integrate with Ezoic, the system will act as a proxy between your site and your users, so that we can provide an Ezoic version of your site. Consequently, when Ezoic is turned on, instead of seeing requests from your users' IP addresses directly, your origin server will see those requests as coming from the Amazon Web Services. This can sometimes be incorrectly classified as 'bot traffic' by your host, which could prevent the page from loading or stop login pages from working, and in those cases this may create an 'origin error', which can look like this:
Key Indicators of an Origin Error
If you're still very early in the process of Ezoic integration and you experience one of the following errors, there's a good chance that this is due to the classification of Ezoic requests as bot traffic, as explained above.
**Please note, if you are seeing a '404' error code, or a '301 redirect' error, it's possible that there is an error at your host and you will need to contact them to check.
Solutions to Origin Errors
Regardless of the error you are seeing, it's a good idea to first check that the DNS records at your host match those you have entered at Ezoic, and that your SSL settings are correct.
If you are still seeing an origin error after confirming that your DNS records and SSL settings are configured correctly, then it's likely that Ezoic IPs are being miscategorized as 'bot traffic' by your host. There are three main options to help your host accept requests from Ezoic, all of which can be implemented by your host at your request. You may find that you are able to resolve your problem just by taking one of these steps, but if you've experienced an issue then it's good practice to implement each of the solutions below.
1. Whitelisting Ezoic's IP Addresses
If your host has blocked one or more of Ezoic's IP addresses because it has mistaken it for bot traffic (typically, but not always, accompanied by a '403 Access Forbidden' error, 520, or 'Origin Error'), whitelisting Ezoic's IP addresses will allow your host to recognise and authorize the IP addresses in question.
All you need to do to is see the attachment at the end of this article and send the listed Ezoic IP addresses to your host, requesting that they add them to their whitelist.
2. The X-Middleton-IP Request Header
With all requests, Ezoic will send the actual IP of the user under the request header 'x-middleton-ip'. If you explain this to your host, they should be able to find the request IP there, rather than by using a 'requested-by' header.
3. User Agent Authentication
If your host cannot whitelist Ezoic's IPs, you can ask them to set user agent authentication for 'X-middleton'. This will enable the host to recognise Ezoic requests due to the presence of 'X-middleton' in the User Agent header, which is featured in all requests made by Ezoic.
4. Set up an X-Forwarded-For Header
The X-Forwarded-For Header is a header field that you can use to make sure the 'real' IP of your users is passed along by a proxy like Ezoic or Cloudflare. This is especially helpful for specific features (like login forms) that need to see the original user's IP. You can add this header to your server (and let your host know that they need to look for it and authorise requests on that basis), or ask your host to do it for you.