TEST THE SITE IN SHARED HOSTING BEFORE SWITCHING THE DNS RECORDS

Before Mapping the Domain and switching the DNS records, we could test the development site in shared hosting using below Options!

For Windows 7 and vista

Step 1. Open the folder C:\Windows\System32\drivers\etc

 

 

 

Step 2.  Double-click on the ‘hosts’ file and choose the Notepad from the list of available software:

host

 

notepad

 

 

Step 3.  Input the following strings in the end of the document:

Domain

Example

IP_address domainname.com
IP_address www.domainname.com

where IP_address is the IP address of your account on the server (it can be found in the Hosting Welcome Email), and domainname.com is your actual domain name:

Step 4. Save the changes.

Completed

 

For Windows 8 or 8.1:

Step 1. Open Notepad with Administrative privileges by clicking Start button

Step 2. Find Applications > type Notepad in search bar and then right-click Notepad and select to Run as Administrator:

Step 3. Once Notepad is opened with Administrative privileges click the File menu > choose Open:

Step 4. Browse to C:\Windows\System32\drivers\etc (you may simply copy this path to address bar and click Enter):

Step 5. Click to show All Files:

Step 6. Choose ‘hosts‘ file and click Open:

Step 7. Insert the following strings in the end of the document:

IP_address  domainname.com
IP_address  www.domainname.com

where IP_address is the IP address of your account on the server (it can be found in the Hosting Welcome Email), and domainname.com is your actual domain name:

Step 8. Save changes.

completed

 

For Mac OS:

STEP  1. Open the Terminal.app, either by start typing Terminal on the Spotlight, or by going into Applications >Utilities > Terminal:

STEP  2. Open the hosts by typing on the Terminal that you have just opened:
sudo nano /private/etc/hosts

STEP  3. Type your user password when prompted (you can navigate the file using the arrow keys).

STEP  4. Edit the hosts file appending your new mappings underneath the default ones:

IP_address domainname.com
IP_address www.domainname.com

where IP_address is the IP address of your account on the server (it can be found in the Hosting Welcome Email), and domainname.com is your actual domain name:

STEP  5. Save the hosts file (when done editing the hosts file, press CTRL+O to save the file > press Enter on the filename prompt > Ctrl+X to exit the editor).

STEP  6. Flush the DNS cache (you can issue a simple Terminal command to flush the DNS cache depending on the version of OS X you are using and have your host file changes to take immediate effect).

NOTE: After completed the testing OR Once Domain mapped to the server, you need to revert the changes back. So, you need to remove the new entries added to your host file or simply comment them by adding ‘#’ at the beginning of each line, then save the changes.

Completed

Leave a Reply

Your email address will not be published. Required fields are marked *