How do I make my site only listening on its hostname. and no longer on its IP?


(Evert Meulie) #1

Hi all,

I noticed that Google has started indexing my site on its (dynamic!) IP address as well lately. How do I configure Discourse so that it only responds on its configured hostname? should work/get indexed. should either redirect to , or simply give some error.

(Jay Pfaffman) #2

I think the best way is to use HTTPS and force redirects to that URL

(Lutz Biermann) #3

Add something like this to your nginx.conf:

server {

    rewrite  ^/(.*)$$1 permanent;

(Jay Pfaffman) #4

But that needs to get done inside the container. It’s easier to enable let’s encrypt.

(Evert Meulie) #5

I went for your suggestion. Easiest indeed.

Thanks! :slight_smile: