R
R
Rudolf Nemov2021-01-26 16:01:06
Domain Name System
Rudolf Nemov, 2021-01-26 16:01:06

How to use domain instead of IP?

On nic.ru, I purchased the domain name "example.ru", it can only give static index.html.

At the same time, I have a system already working that serves my site at "IP":"port"

How can I set up a 301 redirect (or what should be done in general) so that users have a pronounceable name in the browser line, and did the content itself come from an already running service at the same time?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2021-01-26
@rudieduddie

You need to register your IP at nic.ru, and on your web server change the port to 80 for http and 433 for https.
All links within the site must go without a host.

K
ky0, 2021-01-26
@ky0

You described everything correctly - in the config of the web server that gives your site by IP address, enable an unconditional redirect, and in another one related to the domain, enable request processing. If the resource urls on the site are relative, everything will work.
Of course, you first need to do standard operations in the form of changing the DNS A-record of the domain and linking it to your address.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question