Cloudflare with Nginx Proxy Manager

Archive Sep 10, 2022
This post has been archived. Reason: Lost Images

If you're hosting on a local machine, Cloudflare is a must to use. It hides your real IP and has strong protection from DDoS attacks. It's also free in most cases.

Requirements for this guide

  • Installed Nginx Proxy Manager with this guide
  • Cloudflare account with your website added

1. First, take a look at your Cloudflare DNS records

Open up DNS records on your Cloudflare account and check if root A record matches this template

An A Record with, the name @ for root, Your IP, and DNS only at this moment.

If you're using subdomains also, modify all subdomains after setting up an A record.

The subdomain points to @ , so when you edit the A record the subdomains will also point to the new IP.

2. Create a new Proxy Host in Nginx Proxy Manager

First, add a new proxy host or edit the current one(s) for your domain, also request a new SSL certificate for your domain(s).

After all, is set up, check if your website is still accessible, and continue.

3. Changing DNS on Cloudflare again

Open Cloudflare DNS and enable Proxying on A and CNAME records if you made this also for subdomains. Make sure in SSL/TLS that the encryption mode is set to Full or higher.

What we achieved

Now we're hiding our host machine behind Cloudflare which hides our real IP and has DDoS protection.