{"id":37007,"date":"2024-12-16T04:49:18","date_gmt":"2024-12-16T04:49:18","guid":{"rendered":"https:\/\/www.wpstaq.com\/?post_type=knowledgebase&#038;p=37007"},"modified":"2025-05-11T10:47:53","modified_gmt":"2025-05-11T10:47:53","slug":"how-to-serve-static-html-files-alongside-your-wordpress-site","status":"publish","type":"knowledgebase","link":"https:\/\/www.wpstaq.com\/nz\/knowledgebase\/how-to-serve-static-html-files-alongside-your-wordpress-site\/","title":{"rendered":"How to Serve Static HTML Files Alongside Your WordPress Site"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>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 <code>\/free-quote<\/code> that needs to load a static <code>index.html<\/code> file.<\/p>\n<p>This guide explains how to configure your site to serve static HTML files and ensure they load correctly via user-friendly URLs.<\/p>\n<h2>Static HTML File Setup<\/h2>\n<h3>Step 1: Upload Your Static HTML File<\/h3>\n<ol>\n<li>Access your site via <strong>sFTP<\/strong>. View this guide on <a href=\"https:\/\/www.wpstaq.com\/knowledgebase\/ftp-access\/\" target=\"_blank\" rel=\"noopener\">how to access sFTP on Staq<\/a>.<\/li>\n<li>Navigate to the <strong>root directory<\/strong> of your website by clicking on the <code>wordpress<\/code> folder in your sFTP client.<\/li>\n<li>Create a new folder for your static page. For example, name the folder <code>free-quote<\/code>.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-37008\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/wordpress-root-directory.png\" alt=\"WordPress Root Directory\" width=\"1140\" height=\"420\" srcset=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/wordpress-root-directory.png 1140w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/wordpress-root-directory-300x111.png 300w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/wordpress-root-directory-1024x377.png 1024w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/wordpress-root-directory-768x283.png 768w\" sizes=\"auto, (max-width: 1140px) 100vw, 1140px\" \/><\/p>\n<ol start=\"4\">\n<li>Inside the <code>free-quote<\/code> folder, upload your static HTML file. For example, name the file <code>index.html<\/code>.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-37009\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/index-file.png\" alt=\"Index HTML File\" width=\"1190\" height=\"388\" srcset=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/index-file.png 1190w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/index-file-300x98.png 300w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/index-file-1024x334.png 1024w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/index-file-768x250.png 768w\" sizes=\"auto, (max-width: 1190px) 100vw, 1190px\" \/><\/p>\n<hr \/>\n<h3>Step 2: Test the Page<\/h3>\n<p>To access the static page, you\u2019ll need to visit the full server path:<br \/>\n<code>https:\/\/example.com\/free-quote\/index.html<\/code> which should work if you&#8217;ve set up the folder path correctly.<\/p>\n<p>If you try to access <code>https:\/\/example.com\/free-quote\/<\/code> directly, it will return a <strong>403 Forbidden error<\/strong>, as the server requires the full path to locate the file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-37010\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/403-forbidden-error.png\" alt=\"403 Forbidden Error\" width=\"1064\" height=\"458\" srcset=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/403-forbidden-error.png 1064w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/403-forbidden-error-300x129.png 300w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/403-forbidden-error-1024x441.png 1024w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/403-forbidden-error-768x331.png 768w\" sizes=\"auto, (max-width: 1064px) 100vw, 1064px\" \/><\/p>\n<hr \/>\n<h3>Step 3: Configure a Redirect for Clean URLs<\/h3>\n<p>To serve the static HTML file under a clean URL like <code>https:\/\/example.com\/free-quote\/<\/code>:<\/p>\n<ol>\n<li>Log in to your <strong>Staq Panel<\/strong>.<\/li>\n<li>Navigate to the <strong>Redirects<\/strong> section.<\/li>\n<li>Add a redirect rule as follows:\n<ul>\n<li><strong>From:<\/strong> <code>\/free-quote\/<\/code><\/li>\n<li><strong>To:<\/strong> <code>\/free-quote\/index.html<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-37011\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/edit-redirect-rule.png\" alt=\"Edit Redirect Rule\" width=\"610\" height=\"632\" srcset=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/edit-redirect-rule.png 610w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/edit-redirect-rule-290x300.png 290w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<ol start=\"4\">\n<li>Click <strong>Edit<\/strong> to confirm the settings.<\/li>\n<li>Click <strong>Save<\/strong> to apply the redirect.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-37012\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/click-sae-redirects.png\" alt=\"Save Redirect Rule\" width=\"1002\" height=\"399\" srcset=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/click-sae-redirects.png 1002w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/click-sae-redirects-300x119.png 300w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/click-sae-redirects-768x306.png 768w\" sizes=\"auto, (max-width: 1002px) 100vw, 1002px\" \/><\/p>\n<h3>Step 4: Test the Redirect<\/h3>\n<p>Visit <code>https:\/\/example.com\/free-quote\/<\/code> to ensure it redirects correctly to your static HTML file.<\/p>\n<h2>Conclusion<\/h2>\n<p>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.<\/p>\n","protected":false},"featured_media":0,"parent":0,"template":"","class_list":["post-37007","knowledgebase","type-knowledgebase","status-publish","hentry","categories-redirects","categories-static-html-hosting"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Serve Static HTML Files Alongside Your WordPress Site - Managed Hosting Platform for WordPress<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-serve-static-html-files-alongside-your-wordpress-site\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Serve Static HTML Files Alongside Your WordPress Site - Managed Hosting Platform for WordPress\" \/>\n<meta property=\"og:description\" content=\"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&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-serve-static-html-files-alongside-your-wordpress-site\/\" \/>\n<meta property=\"og:site_name\" content=\"Managed Hosting Platform for WordPress\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/staqhosting\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-11T10:47:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/wordpress-root-directory.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-serve-static-html-files-alongside-your-wordpress-site\\\/\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-serve-static-html-files-alongside-your-wordpress-site\\\/\",\"name\":\"How to Serve Static HTML Files Alongside Your WordPress Site - Managed Hosting Platform for WordPress\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-serve-static-html-files-alongside-your-wordpress-site\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-serve-static-html-files-alongside-your-wordpress-site\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/wordpress-root-directory.png\",\"datePublished\":\"2024-12-16T04:49:18+00:00\",\"dateModified\":\"2025-05-11T10:47:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-serve-static-html-files-alongside-your-wordpress-site\\\/#breadcrumb\"},\"inLanguage\":\"en-nz\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-serve-static-html-files-alongside-your-wordpress-site\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-nz\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-serve-static-html-files-alongside-your-wordpress-site\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/wordpress-root-directory.png\",\"contentUrl\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2024\\\/12\\\/wordpress-root-directory.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-serve-static-html-files-alongside-your-wordpress-site\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.wpstaq.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Serve Static HTML Files Alongside Your WordPress Site\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#website\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/\",\"name\":\"Managed Hosting Platform for WordPress\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wpstaq.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-nz\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#organization\",\"name\":\"Staq\",\"alternateName\":\"WPStaq\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-nz\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/cropped-LogoNoText.png\",\"contentUrl\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/cropped-LogoNoText.png\",\"width\":512,\"height\":512,\"caption\":\"Staq\"},\"image\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/staqhosting\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/wpstaq\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Serve Static HTML Files Alongside Your WordPress Site - Managed Hosting Platform for WordPress","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-serve-static-html-files-alongside-your-wordpress-site\/","og_locale":"en_US","og_type":"article","og_title":"How to Serve Static HTML Files Alongside Your WordPress Site - Managed Hosting Platform for WordPress","og_description":"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&hellip;","og_url":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-serve-static-html-files-alongside-your-wordpress-site\/","og_site_name":"Managed Hosting Platform for WordPress","article_publisher":"https:\/\/www.facebook.com\/staqhosting\/","article_modified_time":"2025-05-11T10:47:53+00:00","og_image":[{"url":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/wordpress-root-directory.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-serve-static-html-files-alongside-your-wordpress-site\/","url":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-serve-static-html-files-alongside-your-wordpress-site\/","name":"How to Serve Static HTML Files Alongside Your WordPress Site - Managed Hosting Platform for WordPress","isPartOf":{"@id":"https:\/\/www.wpstaq.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-serve-static-html-files-alongside-your-wordpress-site\/#primaryimage"},"image":{"@id":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-serve-static-html-files-alongside-your-wordpress-site\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/wordpress-root-directory.png","datePublished":"2024-12-16T04:49:18+00:00","dateModified":"2025-05-11T10:47:53+00:00","breadcrumb":{"@id":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-serve-static-html-files-alongside-your-wordpress-site\/#breadcrumb"},"inLanguage":"en-nz","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wpstaq.com\/knowledgebase\/how-to-serve-static-html-files-alongside-your-wordpress-site\/"]}]},{"@type":"ImageObject","inLanguage":"en-nz","@id":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-serve-static-html-files-alongside-your-wordpress-site\/#primaryimage","url":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/wordpress-root-directory.png","contentUrl":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2024\/12\/wordpress-root-directory.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-serve-static-html-files-alongside-your-wordpress-site\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.wpstaq.com\/"},{"@type":"ListItem","position":2,"name":"How to Serve Static HTML Files Alongside Your WordPress Site"}]},{"@type":"WebSite","@id":"https:\/\/www.wpstaq.com\/#website","url":"https:\/\/www.wpstaq.com\/","name":"Managed Hosting Platform for WordPress","description":"","publisher":{"@id":"https:\/\/www.wpstaq.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wpstaq.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-nz"},{"@type":"Organization","@id":"https:\/\/www.wpstaq.com\/#organization","name":"Staq","alternateName":"WPStaq","url":"https:\/\/www.wpstaq.com\/","logo":{"@type":"ImageObject","inLanguage":"en-nz","@id":"https:\/\/www.wpstaq.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/cropped-LogoNoText.png","contentUrl":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/cropped-LogoNoText.png","width":512,"height":512,"caption":"Staq"},"image":{"@id":"https:\/\/www.wpstaq.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/staqhosting\/","https:\/\/www.linkedin.com\/company\/wpstaq"]}]}},"_links":{"self":[{"href":"https:\/\/www.wpstaq.com\/nz\/wp-json\/wp\/v2\/knowledgebase\/37007","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wpstaq.com\/nz\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/www.wpstaq.com\/nz\/wp-json\/wp\/v2\/types\/knowledgebase"}],"wp:attachment":[{"href":"https:\/\/www.wpstaq.com\/nz\/wp-json\/wp\/v2\/media?parent=37007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}