Publish your first website
Publishing a site on web hosting means placing files in a domain root, then checking that the server serves them correctly. The process is short, but three mistakes recur: wrong folder, wrong permissions, and DNS or HTTPS not configured.
1. Prepare the files
Start with a minimal test page, separate from the final application:
<?php
declare(strict_types=1);
echo "OK";Save it as index.php. The web server serves index.php by default when a visitor requests the root folder. For a static site, index.html is enough, but avoid leaving both files competing: priority depends on configuration.
Organize assets in subfolders (assets/, images/) and keep configuration files outside the document root whenever possible.
2. Find the document root
In KeyHelp, open the domain and note the displayed document root. It is the only folder served publicly. Anything above it is not reachable over HTTP, which makes it a good place for backups and configuration files.
Do not confuse the account root with the domain root: placing a site at the account root can make it invisible or overwrite another domain. Write down the exact path before uploading.
3. Upload
Use the KeyHelp file manager or an FTP/SFTP client.
- PHP, HTML, CSS and JS files:
644permissions. - Directories:
755permissions. - No
777, even temporarily. - Show hidden files so
.htaccessis visible.
Upload index.php first, check the result, then add the rest. A partial upload is easier to diagnose than a complete site dropped at once.
4. Test
dig +short A your-domain.tld
dig +short AAAA your-domain.tld
curl -I http://your-domain.tld/The browser should display OK over HTTP; HTTPS is enabled in the next step. If you get:
- 403:
index.phpmissing, wrong name or overly restrictive permissions. - 404: wrong document root or wrong URL.
- 500: PHP error; read the domain logs.
- Timeout: DNS not propagated or domain mispointed.
Also request a nonexistent URL to confirm the default 404 page responds.
5. Enable HTTPS
Once the site works over HTTP, enable the Let's Encrypt certificate in KeyHelp, then force the HTTPS redirect. Reload the page and check the browser padlock.
Finish with cleanup: delete phpinfo.php, test files and deployment archives left in the root. Finally, confirm internal links use HTTPS to avoid mixed content.
Advertisement
Was this article helpful?
Read next
- Discover NeoHeberg web hostingKeyHelp, PHP 8.4, MySQL, FTP, SSL and email: what you manage and what stays out of reach.
- Manage files with FTP and SFTPChoose the right protocol, connect, respect the tree and protect sensitive files.
- Create a MySQL databaseCreate a database and user in KeyHelp, connect PHP, import and back up.