Block IP access and only allow domain

Hello All,

I am not sure if this has been answered before (on searching I haven’t got though), i have installed on docker using traefik and i can access through subdomain as well as its IP.

So is there anyway I can only allow domain or re-route IP to domain?

Thanks in advance!

Welcome to the community @somename!

Did you follow this guide?

Because that should not be possible to reach n8n via the IP address of the server as it only binds the port to the IP

@jan Thanks for checking and helping me and I really appreciate for your time in helping others and ofcourse for this awesome project :slight_smile:

Yes, I have provisioned Ubuntu 20 on oracle cloud and on a fresh installation I have followed exact same steps as give in this article (for env i have used /etc/environment)

After docker compose up, I am able to access via external subdomain but on visiting the external IP on that domain (, it is allowing me with TRAEFIK DEFAULT CERT.

Below are the screenshots.
IP Access

Its binding and stopping the connection too as I am getting 404 on further accepting the default cert but I was thinking can I just re-route this IP to domain instead of 404 page not found?

Thank you very much @somename!

Ah OK, now I understand. Sadly has this question less to do with n8n more with traefik and my knowledge there is more than basic. So can not be much help there. But I guess there is some setting that allows doing that. In this case, you should ask the question rather in the traefik community as that has to happen before it even hits n8n and is so to 100% traefik related. Here the link to their community:

Sorry that I can not be of more help!

Understood and It make sense (this has to be controlled by traefik), thanks for the link and your help.

No problem, enjoy your day!