For name-based sites in web hosting environments, websites can be configured either as name-based sites (multiple domains sharing a single IP) or IP-based sites (each site having its own unique IP address).

You might need to convert a name-based site to an IP-based one when setting up SSL certificates or when you require a dedicated IP address.

This guide will show you how to convert a name-based site into an IP-based site using the “EditVirtDomain” command.

Steps to follow to convert a site:

1. Access the Server as Root

You will need root user privileges to run the required command. Log in via SSH:

  • “ssh root@your-server-ip”

2. Run the EditVirtDomain Command

Use the following syntax to convert a domain from name-based to IP-based:

  • “EditVirtDomain -c ipinfo, namebased=0, ipaddrs=[IP_Address] domain_name”

3. Replace Values with Your Own

  • IP_Address >> The dedicated IP address you want to assign.
  • domain_name >> The domain you want to convert.

Example:

EditVirtDomain -c ipinfo, namebased=0, ipaddrs=[207.44.169.18] centralrock.es

In this example:

  • “207.44.169.18” is the IP address assigned to the domain.
  • centralrock.es” is the domain being converted.

4. Verify the Change

Once the command runs successfully:

  • Restart Apache or Ensim services if needed.
  • Check the domain’s configuration file to confirm it’s now IP-based.

Why Convert to an IP-Based Site?

  • SSL Certificates >> Some older environments require dedicated IPs for SSL installation.

  • Dedicated Resources >> Ensures one domain doesn’t share an IP with others.

  • Custom DNS >> Easier to configure reverse DNS for mail servers.

 

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

How to Install ClamTK on Ubuntu

ClamTK is a graphical front-end for ClamAV, an open-source antivirus engine designed to detect and…

How to Create Email Accounts in cPanel?

This article will guide you on how to create email accounts in cPanel, so you…

What Are Root Nameservers? How DNS Root Servers Work

What Are Root Nameservers? How DNS Root Servers Work

Every time you enter a website address into your browser, the Domain Name System (DNS)…