DNS A type record

Started by Beaker, Sep 28, 2022, 02:33 AM

Previous topic - Next topic

BeakerTopic starter

There is a site on Apache, access to it from the Internet is carried out by an ip address of the type: xхx.xхx.xхx.xхx:xхxx
Accordingly, it is necessary that the website is visited without entering this address, but by entering a regular domain..
 In my case, a subdomain..
Please tell me how to set up a DNS record of type A correctly on the hosting? Because only the ip address of the server is indicated there, without a port.
through srv, it is still done somehow, but I did not understand how to fill it correctly. and is it necessary at the same time to record simply from an ip without a port?


I have not heard that through dns records it was possible to steer Very Happy ports
And so, to configure the reverse proxy, but for this you need vps webhosting.
Or transfer the site to yourself and steer the ports on the router.

It seems to me that it is wrong to solve the issue at the DNS level.
I would solve the issue via HTTP REDIRECT 301-302 or via nginx.

To do this, you need to "host" the desired subdomain somewhere where you can connect to it on the 80th port (i.e. usually).
And in that place, make him an HTTP redirect to http://хх.ххх.ххх.ххх:ххх
When entering the required subdomain, the client is simply redirected to the address: port. It works everywhere and always.

By nginx:
Reception of the required nginx-om domain is configured, and stupidly proxied in xx.xхx.xхx.xхx:xхx
For clients it is transparent at all, they will only see the domain.
And the address:the port will only appear between apache+nginx


A-record (Address record)
Address record indicates a specific IP address of the domain name. The site will not work without it. According to this record, the system determines which server to contact for information when the user enters the name of the site in the address bar of the web browser.

Hostname Record type Record value
eternalhost.net . A
AAAA record (Address record to IPv6)
AAAA DNS record is an analog of the previous A record. The value specifies an external IP address in IPv6 format.

Hostname Record type Record value
eternalhost.net.    AAAA    212:12:2127:1:211:4eef:fe 10:b17