The IP address is displayed instead of the domain name!


#1

Hello,
Our jekyll-project runs on our local server and in the DNS server we have the IP address entered from the local server.
If we e.g. go to http://xyz.com, the page will be displayed. But if we click on a link, the IP address is displayed in the address bar: 188.55.122.23/test.html.

Can somebody tell me how to prevent this from always showing the domain name in the address bar?

Thanks,
G.M.


#2

is jekyll running the server or something else? IIS? Apache? Jekyll is not a production server, so hopefully you are using IIS or Apache or some other web server.


#3

Thanks for the answer.
The whole is running on an Ubuntu and I have started via console with the command:

sudo jekyll serve --host 188.55.122.23 --port = 80

Everything works great.
Is there really no way, e.g. with change of _config.yml?

Thanks,
G.M.


#4

it isn’t recommended to do that, though I think I have seen a couple people say they got it to work. Have you tried changing the host part of the command to your actual domain name instead of the ip address?

Also probably would help if your urls/links were all the full domain name - I assume you are using relative urls and that is why it is going back to the ip address.

Not sure there is much documentation on doing this, I think the built in server is called webbrick - you could google it and see if you can find more info. Seems like you could just use apache or something on your linux box and tell it to serve the _site folder, in the long run that would be better I think.


#5

Great, it worked wonderfully.
Thanks for the tip with apache, will try it soon.
THANK YOU!!!

G.M.