Level 67
server {
listen 80;
server_name 123.123.123.123;
return 301 $scheme://yourdomain.com$request_uri;
}
Add that to your sites nginx config (via forge control panel) substituting the IP and yourdomain.com, up at the top.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have mapped my forge hosting with godaddy's domain, but still I can access website via ip. How I can redirect requests forcefully from ip to domain?
Please or to participate in this conversation.