Configuring DNS settings on RHEL

Last Updated : Jun 10, 2026 |

About this task

If you do not use the Route 53 DNS service, you must provide the IP address of a DNS server that you plan to use on RHEL.

Before you begin

Install RHEL on AWS.

Procedure

  1. Log in to the RHEL as the root user using an SSH connection.
  2. Open the /etc/resolv.conf file in a text editor.

    For example: vi /etc/resolv.conf

  3. Add the following entry to the file:

    nameserver <DNS_ADDRESS>

    In this entry, <DNS_ADDRESS> is the IP address of the DNS server that you plan to use in your deployment.

  4. Optional Do one of the following:
    • If the file does not contain the search entry, add the following entry:

      search <DOMAIN_NAME>

      In this entry, <DOMAIN_NAME> is your domain name. For example: search mycompany.com

    • If the file contains the search entry, enter your domain name at the end of the entry.

      Domain names must be separated with space characters. For example: search example.com mydomain.com

  5. Save the file.