Preview your site before your domain points here

preview, temporary url, hosts file, test site, migration · 0 found this helpful

You can check how your site looks at Barbrick while your domain still points to your old host. This is how you catch problems before visitors do. It is most useful after a migration.

Before you start

  • Your site files must already be on Barbrick. Either we moved them or you uploaded them.
  • Your domain should still point to the old host. If it already points here, you do not need this article.

Option 1: use the preview link

We can make a temporary preview link for each domain on your account.

  1. Open a request at https://barbrick.ca/submitticket.php and ask for a preview link for your domain.
  2. We reply, usually the same day, with the link.
  3. Open the link in your browser.

Preview links can look broken. Images and styles may point back to the real domain, and WordPress sites sometimes redirect to the live address. If that happens, use option 2.

Option 2: edit your hosts file

The hosts file tells your own computer to look for your domain at Barbrick. Nobody else is affected.

  1. Ask us for your server's IP address. Open a support request or look in your welcome email. See Open a support request.
  2. Open the hosts file as an administrator.
Computer File location
Windows C:\Windows\System32\drivers\etc\hosts
Mac /etc/hosts
  1. Add two lines at the bottom, using your own IP address and domain.
203.0.113.25   example.ca
203.0.113.25   www.example.ca
  1. Save the file.
  2. Close and reopen your browser, then visit https://example.ca.

203.0.113.25 is a sample address only. Use the one we give you.

On a Mac, you can edit the file in Terminal with sudo nano /etc/hosts. On Windows, open Notepad with Run as administrator, then open the file.

Important: Remove the two lines when you finish. If you leave them in, your computer will keep showing the Barbrick copy, even after other people see something different.

What to check

  • Every page loads, including the contact page.
  • Images appear.
  • Forms submit and the message arrives.
  • The shop checkout works, if you have one.
  • The site looks right on a phone. Your phone does not use the hosts file, so test a phone only after the domain points here.

The browser may show a certificate warning during the preview, since free SSL is issued once the domain points here. This is expected.

If something goes wrong

The site still shows the old version. Your browser cached the old address. Restart the browser, or flush your system's DNS cache. On a Mac, run sudo dscacheutil -flushcache. On Windows, run ipconfig /flushdns.

You see a placeholder page. Your files may be in the wrong folder. See Where your website files live.

You see a "database error." A migrated site might need its database connection checked. Tell us and we will look. See Fix "Error establishing a database connection".

When you are happy, point the domain. See Point your domain to Barbrick.

Was this helpful?

Still stuck? Ask us and we'll walk you through it.