Introduction
Integrating your site is the essential first step to unlocking Ezoic’s AI-driven optimization, performance tools, and premium ad demand. Ezoic is designed to be flexible, offering multiple methods to connect your site. This guide will help you understand the primary integration options and choose the one that best fits your technical environment.
Steps
JavaScript Integration (Recommended)
Javascript integration involves placing custom Ezoic code throughout your site. This method has the most compatibility with various hosting providers, CMS types, and other various factors. It also provides you with the most granular control of ad execution on your site.
Best For: Most sites, including those on specialized hosts or those who want granular control over ad execution without changing DNS settings.
JavaScript integration involves adding a lightweight snippet of code to your website’s header. This is the most recommended connection method due to its high compatibility and ease of setup across various hosting providers and CMS types.
-
How it works: You place a "Header Script" and "Privacy Script" within the
<head>tag of your website. -
Ad Location Code: In addition to the header script, you must insert Ad Location code (placeholders) into the
<body>of your site where you want ads to appear. -
Key Advantage: It doesn't require DNS or Name Server changes, providing a faster and more straightforward path to monetization.
-
Setup: View the full JavaScript Integration Guide for implementation details.
WordPress Plugin (JavaScript via Plugin)
Best For: WordPress users who prefer an automated setup without manually editing theme files.
The Ezoic WordPress plugin acts as a delivery tool for our JavaScript integration. Instead of manually copying and pasting code into your theme, the plugin automatically handles the script insertion for you.
-
Process: Simply install the Ezoic plugin from the WordPress repository and enable the JavaScript Integration option.
-
Ad Placements: The plugin includes an Ad Placements tab where you can choose where to insert ad location codes (e.g., "Under First Paragraph") without needing to touch your site's code.
-
Advantage: It manages complex tasks like script insertion and
ads.txtupdates directly from your WordPress admin dashboard. - Setup: View the full Wordpress JavaScript Integration Guide for implementation details.
Cloud Integration (Name Servers or Cloudflare)
Best For: Publishers seeking server-level optimization and Ezoic’s CDN.
Cloud integration allows Ezoic to act as an optimization layer between your host and your visitors.
Important Note: While Cloud Integration offers powerful performance benefits at the server level, JavaScript is still the recommended method for connecting your site's ad environment to Ezoic to ensure the most stable and compatible ad delivery.
- Name Server Integration
-
Name Server integration lets Ezoic manage your DNS directly. It's a good fit if you don't already use a CDN and want Ezoic's built-in SSL and edge caching at the server level.
Steps:
- Log into your Ezoic account and click Integrate Your Site (existing users should go to Settings > Connection > Integration), then select the Name Server option.
- Ezoic displays two custom name servers on the right side of the screen. Keep this tab open.
- In a separate tab, log into your domain registrar (GoDaddy, Namecheap, Google Domains, etc.) and navigate to the DNS or Name Server settings for your domain.
- Replace your existing name servers with the two Ezoic name servers shown in your Ezoic dashboard. Save the change.
- Return to Ezoic. Once your registrar has published the new name servers and DNS propagation completes, the integration status will update automatically. Propagation typically takes anywhere from a few minutes to 24 hours depending on your registrar and your prior TTL settings.
-
- Cloudflare Integration
- Cloudflare integration allows your Cloudflare account to directly connect with Ezoic.
- Steps:
- Ensure you already have an active Cloudflare account and that your name servers are pointed to Cloudflare.
- Log into your Ezoic account and click on Integrate Your Site (existing users should go to Settings > Connection > Integration), then select the Cloudflare option.
- Click Create Token in Cloudflare. This opens Cloudflare in a new tab with the exact permissions Ezoic needs already pre-filled: DNS, Zone Settings, SSL and Certificates, Cache Purge, and Page Rules. Log in to Cloudflare if prompted.
- Review the pre-filled permissions and click Continue to summary, then Create Token. Under Zone Resources you can optionally restrict the token to just your domain.
- Copy the token that Cloudflare displays (it is only shown once), return to the Ezoic tab, paste it into the Cloudflare API Token field, and click Connect Cloudflare.
- Steps:
- Cloudflare integration allows your Cloudflare account to directly connect with Ezoic.
If you have Authenticated Origin Pulls enabled on your Cloudflare zone, disable it before connecting or the integration will fail. The token only grants what Ezoic actually uses, and you can revoke it from your Cloudflare account at any time.
FAQs
Does Ezoic replace my web host?
No. Ezoic is an optimization and monetization layer. Regardless of your integration method, your original host remains where your website content and files are stored.
How long does integration take to show as "Complete"?
The Ezoic dashboard status usually updates shortly after integration is detected. For Cloud integration, "propagation" (the time it takes the internet to recognize DNS changes) can take up to 24 hours.
Will integration take my site offline?
No. All methods are designed to be seamless. If you choose Cloud integration, simply ensure your DNS records in the Ezoic dashboard match your host's records exactly to ensure traffic routes correctly.
Can I switch methods?
Yes. You can move from the WordPress plugin to manual JavaScript integration or vice versa. If switching from Cloud to JavaScript, ensure you have a valid SSL certificate at your host before changing your DNS settings.