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 Make Links Trigger Direct File Downloads

Learn how to make files download directly when you click their links, rather than opening…

How can I upload files on an add-on domain?

To upload files for an add-on domain, you need to place them in the correct…

How to Link MySQL Database to PHP With MySQLi and PDO

How to Link MySQL Database to PHP With MySQLi and PDO

When creating dynamic webpages, connecting a PHP application to a MySQL database is a vital…