Skip to content

Preview URLs

We have a Preview URL tool available which can help you to test your websites before going live. This generates a temporary URL for your site, proxying through to your Prostack server without you needing to configure anything or switch your DNS.

This is a useful alternative to modifying /etc/hosts or similar methods of testing sites, and works on all devices, including mobile.

Generating a Preview URL

When creating a new site

Use the -p flag when creating a new site with psnew. The script will automatically generate a URL.

cito~ # psnew -d prostackdemo.com -t php -s -i -p
Using default PHP version: 8.2

Adding Domain prostackdemo.com with username demo
Setting up a new site at /home/demo/public_html
[+] prostackdemo.com preview URL is aixoq.preview.prostack.host
[+] Domain doesn't appear to be live here yet. Not going to try issuing a certificate.
[+] All done!

For pre-existing websites

Visit https://preview.prostack.host/ and enter your server IP and domain name into the form, ensuring you check the captcha box.

This will generate a Preview URL and display it to you. Preview URLs do not expire. The URL prefix is randomly generated.

A note about WWW and non-WWW

Websites commonly use either non-www (e.g. domain.com) or www (e.g. www.domain.com) and redirect one to the other.

When you add a preview URL please ensure you use the correct, non-redirecting version. If you try to add a Preview URL that simply redirects, it will not work.

Caveats and gotchas

  • Note that preview URLs modify HTTP headers on the fly. Some sites that do this may not work.
  • Your site must be SSL-enabled and support SNI to work. If SSL is not enabled, it will not work. The certificate does not, however, need to be valid.

The Preview URL tool works on non-Cito servers as well, including cPanel.