How to configure a dedicated IP address to show the website

If you wish to have your website accessed via the IP address-based link, the first thing you need is a dedicated IP address.

On our Shared packages one main server IP address is used by different cPanel accounts on it, thus, it is not possible to assign your domain to it. In such cases, you can purchase a dedicated IP address that allows having a unique server IP address for your account on Shared server.

PLEASE NOTE: due to certain technical restrictions, it is possible to assign only one dedicated IP address to a single cPanel account on Shared server.

On VPS and Dedicated servers, you can create multiple cPanel accounts and assign different dedicated IP addresses to them. You can find detailed instructions on how it can be done here.

NOTE: Though VPS and Dedicated servers have a dedicated IP address assigned to the plan, it resolves the content of a cPanel account's primary domain. Thus, it is required to order another dedicated IP address.


How to change website links for WordPress website

There are two main ways to set the IP address as a website link: via WordPress admin dashboard and via website database.

To change the website URL in your WordPress admin dashboard, please follow these steps:

1. Log in to the WordPress admin panel >> go to the Settings menu >> General.
2. Update WordPress Address (URL) line and Site Address (URL) lines and save the changes:

To change the website URL in your website database, please follow these steps:

1. Locate the database name in wp-config.php file.
2. Go to cPanel >> Databases section >> phpMyAdmin menu:


3. In the list of databases, locate the name of your website database and click on it. Then, select wp_options table (wp_ is the database prefix and it can be different for your installation):


4. Choose the siteurl and home options and enter the desired IP address instead of the domain there:


Once done, you can enter the IP address in the browser and see the content of your website:


How to assign a certain domain to the IP address

In case the account contains multiple websites hosted in it, the IP address gets assigned to a random domain by default.

If you wish to have a dedicated IP address redirected to some certain domain in your account, please follow these steps:

1. Locate the .htaccess file of your home directory in cPanel >> File Manager menu. If there is no such, you can create it using this tutorial.
2. Click on the file and choose Edit at the top bar:

Add the following rule to the file and click Save Changes:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^(.*)$ "http:\/\/111.111.111.111/$1" [R=301,L]
The .htaccess file with the above rule should look this way:

After adding the rule to the .htaccess file of the home directory, the needed domain will be redirected to the dedicated IP address in the browser.

That's it!

Need any help? Contact our HelpDesk
Updated
Viewed
5712 times

Need help? We're always here for you.