Test websites before going live with temporary 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.We automatically generate preview URLs for all new Cito sites. To view this, click the “Preview” button in the site’s overview card.
Using the CLI
To generate a preview URL when creating a site via CLI, use the -p flag with psnew.
cito~ # psnew -d prostackdemo.com -t php -s -i -pUsing default PHP version: 8.2Adding Domain prostackdemo.com with username demoSetting 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-WWWWebsites 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
There are a few caveats to using the Preview URL system that need to be considered:
Preview URLs modify HTTP headers on the fly. Some headers are stripped or changed (for example to prevent search engine indexing).
If you have an IP restriction on your site this may not behave properly due to the way the Preview URL system works.
Your site must be SSL-enabled and support SNI to work. If SSL is not enabled, it will not work. The certificate does not need to be valid.
The Preview URL tool works on non-Cito servers as well, including cPanel.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Prostack Cito","colors":{"primary":"#1C1F38","light":"#3B4063","dark":"#0F1120"},"logo":{"light":"/logo/logo.png","dark":"/logo/logo.png"},"favicon":"/logo/logo.png","appearance":{"default":"light"},"navbar":{"links":[{"href":"https://feedback.cito.prostack.uk/","label":"Feedback"}],"primary":{"type":"button","label":"Log into Cito","href":"https://cito.prostack.uk"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/prostackhost","x":"https://x.com/prostackhost"}},"integrations":{"telemetry":{"enabled":false}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"hasAudioNarration":false,"customDomains":[],"gitSource":{"type":"github","owner":"local","repo":"local","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"local","isBase":true},"buildId":"local","clientVersion":"0.0.4203"},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false,"isLoggedInCli":false,"mintExport":{}},"customCss":[{"filePath":"style.css","content":":root{--background: #f9f9f9 !important;--bg-background: #f9f9f9 !important;--background-light: 249 249 249 !important;--navbar-background: #f9f9f9 !important}html:not(.dark){background-color:#f9f9f9}html:not(.dark) body{background-color:#f9f9f9}html:not(.dark) #content-container{background-color:#f9f9f9}html:not(.dark) #navbar,html:not(.dark) nav,html:not(.dark) header,html:not(.dark) [class*=\"Navbar\"],html:not(.dark) [class*=\"navbar\"],html:not(.dark) [class*=\"Header\"],html:not(.dark) [class*=\"header\"],html:not(.dark) [class*=\"TopBar\"],html:not(.dark) [class*=\"topbar\"],html:not(.dark) [class*=\"nav-\"],html:not(.dark) [class*=\"scroll\"],html:not(.dark) [class*=\"sticky\"]{background-color:#f9f9f9!important;background:#f9f9f9!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}html:not(.dark) [class*=\"Navbar\"]::before,html:not(.dark) [class*=\"Navbar\"]::after,html:not(.dark) header::before,html:not(.dark) header::after,html:not(.dark) nav::before,html:not(.dark) nav::after{background-color:#f9f9f9!important;background:#f9f9f9!important}header a[href=\"/\"],[class*=\"Navbar\"] a[href=\"/\"]{display:inline-flex;align-items:center;gap:0.5rem}header a[href=\"/\"]::after,[class*=\"Navbar\"] a[href=\"/\"]::after{content:\"Cito Documentation\";font-weight:600;font-size:1.1rem;color:#1C1F38;white-space:nowrap}html.dark header a[href=\"/\"]::after,html.dark [class*=\"Navbar\"] a[href=\"/\"]::after{color:white}"}],"page":{"pagePath":"managing-sites/preview","slug":"/managing-sites/preview","pageMetadata":{"title":"Preview URLs","description":"Test websites before going live with temporary preview URLs","href":"/managing-sites/preview"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Test websites before going live with temporary preview URLs\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,img:`img`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`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.`}),`\n`,_jsxs(_components.p,{children:[`This is a useful alternative to modifying `,_jsx(_components.code,{children:`/etc/hosts`}),` or similar methods of testing sites, and works on all devices, including mobile.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`We automatically generate preview URLs for all new Cito sites.`}),` To view this, click the “Preview” button in the site’s overview card.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.img,{src:`/images/screenshots/previewsite.png`,alt:`Preview Site`})}),`\n`,_jsx(Heading,{level:`2`,id:`using-the-cli`,children:`Using the CLI`}),`\n`,_jsxs(_components.p,{children:[`To generate a preview URL when creating a site via CLI, use the `,_jsx(_components.code,{children:`-p`}),` flag with `,_jsx(_components.code,{children:`psnew`}),`.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`9`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`cito~ # psnew -d prostackdemo.com -t php -s -i -p`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Using default PHP version: 8.2`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Adding Domain prostackdemo.com with username demo`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Setting up a new site at /home/demo/public_html`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[+] prostackdemo.com preview URL is aixoq.preview.prostack.host`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[+] Domain doesn't appear to be live here yet. Not going to try issuing a certificate.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`[+] All done!`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`for-pre-existing-websites`,children:`For pre-existing websites`}),`\n`,_jsxs(_components.p,{children:[`Visit `,_jsx(_components.a,{href:`https://preview.prostack.host`,children:`https://preview.prostack.host/`}),` and enter your server IP and domain name into the form, ensuring you check the captcha box.`]}),`\n`,_jsx(_components.p,{children:`This will generate a Preview URL and display it to you. Preview URLs do not expire. The URL prefix is randomly generated.`}),`\n`,_jsxs(Warning,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`A note about WWW and non-WWW`})}),_jsxs(_components.p,{children:[`Websites commonly use either non-www (e.g. `,_jsx(_components.code,{children:`domain.com`}),`) or www (e.g. `,_jsx(_components.code,{children:`www.domain.com`}),`) and redirect one to the other.`]}),_jsx(_components.p,{children:`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.`})]}),`\n`,_jsx(Heading,{level:`2`,id:`caveats-and-gotchas`,children:`Caveats and gotchas`}),`\n`,_jsx(_components.p,{children:`There are a few caveats to using the Preview URL system that need to be considered:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Preview URLs modify HTTP headers on the fly. Some headers are stripped or changed (for example to prevent search engine indexing).`}),`\n`,_jsx(_components.li,{children:`If you have an IP restriction on your site this may not behave properly due to the way the Preview URL system works.`}),`\n`,_jsxs(_components.li,{children:[`Your site `,_jsx(_components.em,{children:`must`}),` be SSL-enabled and support SNI to work. If SSL is not enabled, it will not work. The certificate does not need to be valid.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`The Preview URL tool works on non-Cito servers as well, including cPanel.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Preview URLs","description":"Test websites before going live with temporary preview URLs","href":"/managing-sites/preview"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Using the CLI","slug":"using-the-cli","depth":2,"children":[{"title":"For pre-existing websites","slug":"for-pre-existing-websites","depth":3,"children":[]}]},{"title":"Caveats and gotchas","slug":"caveats-and-gotchas","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"localhost","siteName":"Prostack Cito","title":"Preview URLs - Prostack Cito","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"managing-sites/preview.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Test websites before going live with temporary preview URLs\">\u003cmeta data-mint-head name=\"application-name\" content=\"Prostack Cito\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/favicons/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicons/favicon-32x32.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicons/favicon-16x16.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicons/favicon.ico\">\u003cmeta data-mint-head property=\"og:title\" content=\"Preview URLs - Prostack Cito\">\u003cmeta data-mint-head property=\"og:description\" content=\"Test websites before going live with temporary preview URLs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Prostack Cito\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://local./managing-sites/preview\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Preview URLs - Prostack Cito\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Test websites before going live with temporary preview URLs\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/favicons/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Prostack Cito\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1C1F38\">\u003clink data-mint-head rel=\"canonical\" href=\"https://local./managing-sites/preview\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/managing-sites/preview.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Prostack Cito\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Prostack Cito\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/managing-sites/preview.md","siteName":"Prostack Cito","nav":{"groups":[{"group":"Home","pages":[{"title":"Introduction","href":"/index"}]},{"group":"Getting Started","pages":[{"title":"First Steps","href":"/getting-started/index"},{"title":"Generating SSH Keys","href":"/getting-started/ssh-keys"},{"title":"Migrating from another host","href":"/getting-started/migration"},{"title":"Frequently Asked Questions","href":"/getting-started/faq"}]},{"group":"Creating Sites","pages":[{"title":"Adding a New Site","href":"/creating-sites/overview"},{"title":"Installing WordPress","href":"/creating-sites/wordpress"},{"title":"NodeJS Applications","href":"/creating-sites/nodejs"},{"title":"Proxy Pass","href":"/creating-sites/proxy-pass"}]},{"group":"Containers","pages":[{"title":"Container Sites","href":"/creating-sites/docker"},{"title":"Importing from Docker Compose","href":"/creating-sites/docker-compose"},{"title":"Managing Containers","href":"/managing-sites/containers"},{"title":"Services","href":"/managing-sites/container-services"},{"title":"Converting a Proxy Pass Site","href":"/managing-sites/convert-proxy-site"},{"title":"Container Limits","href":"/managing-sites/container-limits"}]},{"group":"Managing Sites","pages":[{"title":"Sites Overview","href":"/managing-sites/overview"},{"title":"Changing PHP Versions","href":"/managing-sites/php-version"},{"title":"Custom Document Roots","description":"Change the document root (web root) for your Cito sites","href":"/managing-sites/document-root"},{"title":"Preview URLs","href":"/managing-sites/preview"},{"title":"Cloning Sites","description":"Make copies of websites including files and databases for testing","href":"/managing-sites/clone"},{"title":"Renaming Sites","href":"/managing-sites/rename"},{"title":"Suspending Sites","href":"/managing-sites/suspend"},{"title":"Deleting Sites","href":"/managing-sites/delete"},{"title":".htaccess Import","href":"/managing-sites/htaccess-import"}]},{"group":"Domains, SSL \u0026 Email","pages":[{"title":"Aliases","href":"/managing-sites/aliases"},{"title":"Redirects","href":"/managing-sites/redirects"},{"title":"Domain Information","href":"/managing-sites/domain-information"},{"title":"SSL Certificates","href":"/cli/ssl"},{"title":"Email","href":"/managing-sites/email"}]},{"group":"Files \u0026 Databases","pages":[{"title":"File Manager","href":"/managing-sites/file-manager"},{"title":"Managing MySQL Databases","href":"/managing-sites/mysql"},{"title":"Database Ownership","href":"/managing-sites/database-ownership"},{"title":"Backups","href":"/managing-sites/backups"}]},{"group":"Security","pages":[{"title":"Password Protection","href":"/managing-sites/password-protection"},{"title":"IP Blocking","href":"/managing-sites/ip-blocking"},{"title":"Bot \u0026 Crawler Blocking","href":"/managing-sites/bot-blocking"},{"title":"Firewall","href":"/managing-sites/firewall"},{"title":"Malware Protection","href":"/managing-sites/security"}]},{"group":"Performance \u0026 Monitoring","pages":[{"title":"Caching","href":"/managing-sites/caching"},{"title":"Analytics","href":"/managing-sites/analytics"},{"title":"Viewing Logs","href":"/managing-sites/logs"}]},{"group":"Deployment \u0026 Automation","pages":[{"title":"SSH","href":"/deploying/ssh"},{"title":"Working with Git","href":"/deploying/git"},{"title":"Cron Jobs","href":"/managing-sites/crons"},{"title":"MCP Server (beta)","href":"/deploying/mcp"}]},{"group":"Server Configuration","pages":[{"title":"Nginx","href":"/cli/nginx"},{"title":"PHP","href":"/cli/php"}]},{"group":"Account","pages":[{"title":"User Management","href":"/account/authentication"},{"title":"Audit Logs","href":"/account/audit-logs"}]},{"group":"Support","pages":[{"title":"Getting Support","href":"/support/contact"},{"title":"Changelog","href":"/support/changelog"}]}]},"basePath":"","title":"Preview URLs - Prostack Cito","buildId":"3fee6f877672","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-sgQzkCp-.js","lightbox-handle-r17bVUz3.js"]}