# Forcing access to Discourse via domain name only

**URL:** <https://meta.discourse.org/t/forcing-access-to-discourse-via-domain-name-only/70574>\
**Category:** Self-hosting\
**Created:** [22 سبتمبر 2017، 1:39م UTC](https://meta.discourse.org/t/forcing-access-to-discourse-via-domain-name-only/70574 "2017-09-22T13:39:32Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Carlo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/carlo/32/79036_2.png) [@Carlo](https://meta.discourse.org/u/Carlo)\
**Post date:** [5 أكتوبر 2017، 2:05م UTC](https://meta.discourse.org/t/forcing-access-to-discourse-via-domain-name-only/70574/4 "2017-10-05T14:05:57Z")

</div>

Really sorry I didn’t make myself clear.

Let say my website is hosted on the ip: 123.123.123.123  
And this is my domain name: [forum.example.com](http://forum.example.com)

Right now, visitors can browse the forum by accessing the ip 123.123.123.123

**What I want is:**

When someone goes to the ip, it will be redirect to [forum.example.com](http://forum.example.com)

The issue is that I am not able to locate ngnix default file.

---

_[View the full topic](https://meta.discourse.org/t/forcing-access-to-discourse-via-domain-name-only/70574)._
