Getting Started

Deployment Deployment - Diagnose Migrations Staging

Site Management

Backups Client Reporting Passwords Plugin Automation Plugin Management - Global Plugins & Themes - Diagnose Plugins & Themes - General Plugins & Themes - Git Plugins & Themes - Logs Must Install White Label WordPress Updates

Caching & Performance

Caching Caching - Blogs/Articles Caching - Diagnose Caching - Git Caching - WooCommerce Redis Optimize & Scale

Security

Security Security - Firewall

SMTP, CDN & DNS

SMTP SendGrid CDN CDN - AWS CDN - Cloudflare CDN - Diagnose Domains & DNS

Server & Tools

Analytics & Logs CRON Jobs Database Debug Tool Git Monitoring PHP Settings Redirects SEO Tools Server Errors sFTP SSL

Staq Billing

Staq Billing > Account Staq Billing > Client Staq Billing > Setup

Media

Media Media - Diagnose Media - Optimize

Accounts & Billing

Accounts & Billing

General

WordPress Hosting Website Diagnose Troubleshoot - Other

How to Serve Static HTML Files Alongside Your WordPress Site


On this page

    Introduction

    While Staq specializes in managed hosting for WordPress, there are scenarios where you may want to host a static HTML file outside of WordPress, accessible on the same domain. For example, you may have a custom page like /free-quote that needs to load a static index.html file.

    This guide explains how to configure your site to serve static HTML files and ensure they load correctly via user-friendly URLs.

    Static HTML File Setup

    Step 1: Upload Your Static HTML File

    1. Access your site via sFTP. View this guide on how to access sFTP on Staq.
    2. Navigate to the root directory of your website by clicking on the wordpress folder in your sFTP client.
    3. Create a new folder for your static page. For example, name the folder free-quote.

    WordPress Root Directory

    1. Inside the free-quote folder, upload your static HTML file. For example, name the file index.html.

    Index HTML File


    Step 2: Test the Page

    To access the static page, you’ll need to visit the full server path:
    https://example.com/free-quote/index.html which should work if you’ve set up the folder path correctly.

    If you try to access https://example.com/free-quote/ directly, it will return a 403 Forbidden error, as the server requires the full path to locate the file.

    403 Forbidden Error


    Step 3: Configure a Redirect for Clean URLs

    To serve the static HTML file under a clean URL like https://example.com/free-quote/:

    1. Log in to your Staq Panel.
    2. Navigate to the Redirects section.
    3. Add a redirect rule as follows:
      • From: /free-quote/
      • To: /free-quote/index.html

    Edit Redirect Rule

    1. Click Edit to confirm the settings.
    2. Click Save to apply the redirect.

    Save Redirect Rule

    Step 4: Test the Redirect

    Visit https://example.com/free-quote/ to ensure it redirects correctly to your static HTML file.

    Conclusion

    By creating a redirect in the Staq Panel, you can easily serve static HTML files under clean URLs without modifying your WordPress setup. If you encounter any issues, feel free to contact Staq support for assistance.

    Need some help?

    We all do sometimes. Please reach out to our support team by dropping us a support ticket. We will respond fast.