How can I view my website on Mac before repointing my domain?

To view/test your website before repointing the DNS of the domain, you can edit a text file (called the ‘hosts’ file) on your computer to bypass the live DNS for the domain.

This change will only apply to your computer and will make no changes to the live DNS of the domain.

For steps on how to do this, please see the following:

 

  1. Open the Terminal app (either by start typing Terminal on the Spotlight, or by going into Applications > Utilities > Terminal)
  2. Open the hosts file. To open your host file please type the following into your Terminal that you have just opened: sudo nano /private/etc/hosts Type the password for your mac when prompted.
  3. Edit the hosts file. A) Use the arrow keys to navigate to an empty line at the bottom of the page. B) Once there, enter in the following (replacing ‘ip_address’ with the *IP address for your hosting account and ‘domain.com’ with your actual domain name): ip_address domain.com www.domain.com
  4. Save the hosts file. A) When done editing the hosts file, press control-o to save the file. B) Press enter on the filename prompt, and control-x to exit the editor.
  5. Flush the DNS cache (optional if not working). Please see https://support.apple.com/en-us/HT202516 for more information on how to do this.

Now, when you go to the website it will load up as it appears on your new hosting account.

*You can find the IP address for your hosting account by logging in to your cPanel control panel and in the section on the left, clicking on Server information -> Shared IP Address.

 

If you have any questions on the above, please do not hesitate to 'Open a Ticket' and we will be happy to advise further.

  • #mac, #website, #repointing, #domain
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How can I set up my own holding page?

While you are working to build your new website, it is often desirable to put up a holding or...

I can’t see the website I just uploaded by FTP

If you have uploaded your website but cannot see it online there may be some simple reasons for...

How do I upload files to my hosting account?

If you are designing your website on your own computer, you will need to upload the website files...

I cannot FTP to my account – am I blocked?

LetsHost operate multiple layers of account security for all users. If you entered a password...

How can I view my website on Windows before repointing my domain?

To view/test your website before repointing the DNS of the domain, you can edit a text file...