{"id":29884,"date":"2021-04-22T09:09:15","date_gmt":"2021-04-22T09:09:15","guid":{"rendered":"https:\/\/www.wpstaq.com\/knowledgebase\/server-redirects\/"},"modified":"2024-12-16T05:32:26","modified_gmt":"2024-12-16T05:32:26","slug":"server-redirects","status":"publish","type":"knowledgebase","link":"https:\/\/www.wpstaq.com\/sg\/knowledgebase\/server-redirects\/","title":{"rendered":"Server Redirects"},"content":{"rendered":"<p>The <strong>Redirects<\/strong> function in the Staq Panel is the most efficient and secure way to handle server-side redirections. Unlike WordPress plugins, which can pose security risks if compromised, the Staq Redirects tool ensures safe, server-level redirects.<\/p>\n<p>With this tool, you can:<\/p>\n<ul>\n<li>Export redirects via a CSV file<\/li>\n<li>Import existing redirects into Staq via CSV<\/li>\n<\/ul>\n<p>The export functionality supports query strings, making it versatile and reliable for complex redirect requirements.<\/p>\n<h2>Supported Redirect Types<\/h2>\n<p>The Staq Redirects tool supports the following redirect types:<\/p>\n<ul>\n<li><strong>301:<\/strong> Moved Permanently<\/li>\n<li><strong>302:<\/strong> Moved Temporarily<\/li>\n<li><strong>403:<\/strong> Forbidden<\/li>\n<li><strong>404:<\/strong> Not Found<\/li>\n<li><strong>444:<\/strong> No Response<\/li>\n<\/ul>\n<p>You can access the Redirects tool via the Staq Panel:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-3214\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/nginx-redirects-1024x597.png\" alt=\"Redirects Tool in Staq Panel\" width=\"1024\" height=\"597\" \/><\/p>\n<h2>Setting Up Redirects<\/h2>\n<h3>Importing or Adding Redirects<\/h3>\n<p>To import redirects, download the CSV template available under the Redirects section in the Staq Panel. Alternatively, you can manually add entries by clicking <strong>+Add<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-3216\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/redirects-csv-1024x449.png\" alt=\"Import or Add Redirects\" width=\"1024\" height=\"449\" \/><\/p>\n<h2>Redirecting Between Domains<\/h2>\n<p>Say your primary domain is <code>example.com<\/code>, and you want to set up the following redirects:<\/p>\n<ul>\n<li><code>example.com\/payment \u2192 stripe.com\/123<\/code><\/li>\n<li><code>hello.com\/about \u2192 example.com\/about<\/code><\/li>\n<li><code>test.com \u2192 example.com<\/code> (domain alias)<\/li>\n<\/ul>\n<h3>Step 1: Set Up Domains<\/h3>\n<p>Before creating redirects, ensure all domains are added to the Staq Panel:<\/p>\n<ul>\n<li>Navigate to the <strong>Domains<\/strong> section in the Staq Panel.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-34450\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/07\/Domains-Staq-Panel.png\" alt=\"Domains in Staq Panel\" width=\"830\" height=\"334\" srcset=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/07\/Domains-Staq-Panel.png 830w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/07\/Domains-Staq-Panel-300x121.png 300w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/07\/Domains-Staq-Panel-768x309.png 768w\" sizes=\"auto, (max-width: 830px) 100vw, 830px\" \/><\/p>\n<ul>\n<li>Click <strong>+Add Domain<\/strong> and enter the appropriate domain names.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/add-domain-1024x446.png\" alt=\"Add Domain\" width=\"1024\" height=\"446\" \/><\/p>\n<p>Ensure that the DNS A records for these domains point to the correct server IP address. Without this step, the redirect functionality will not work properly.<\/p>\n<h3>Step 2: Add Redirects<\/h3>\n<ol>\n<li>Go to the <strong>Redirects<\/strong> section in the Staq Panel.<\/li>\n<li>Click <strong>+Add<\/strong>.<\/li>\n<li>In the popup modal, select the appropriate domain from the <strong>Origin Host<\/strong> list.<\/li>\n<li>For the <strong>From<\/strong> field, enter the path without the domain (e.g., <code>\/about<\/code>).<\/li>\n<li>In the <strong>To<\/strong> field, enter the full URL (e.g., <code>https:\/\/example.com\/about<\/code>).<\/li>\n<li>Click <strong>Save<\/strong>.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-34615\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/Origin-Host.png\" alt=\"Origin Host in Redirects\" width=\"1970\" height=\"1350\" srcset=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/Origin-Host.png 1970w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/Origin-Host-300x206.png 300w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/Origin-Host-1024x702.png 1024w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/Origin-Host-768x526.png 768w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/Origin-Host-1536x1053.png 1536w\" sizes=\"auto, (max-width: 1970px) 100vw, 1970px\" \/><\/p>\n<h2>Redirecting www to Root Domain or Vice Versa<\/h2>\n<p>If your website needs to redirect from <code>www.example.com<\/code> to <code>example.com<\/code> (or vice versa):<\/p>\n<ul>\n<li>Go to the <strong>Domains<\/strong> section in the Staq Panel and ensure a <strong>www<\/strong> entry exists.<\/li>\n<li>If it doesn\u2019t exist, add the <strong>www<\/strong> record and ensure it points to the correct server IP address.<\/li>\n<li>Based on setting the domain as\u00a0<strong>Primary<\/strong>, it&#8217;ll redirect all entries to the primary domain.\n<ul>\n<li>Based on this, you do not need to setup a redirect.<\/li>\n<li>The A records must point to the Staq IP address<\/li>\n<li>Staq will generate an SSL certificate for the non-primary domain<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-37016\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/www-does-not-exist.png\" alt=\"WWW Domain Record Missing\" width=\"1156\" height=\"439\" srcset=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/www-does-not-exist.png 1156w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/www-does-not-exist-300x114.png 300w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/www-does-not-exist-1024x389.png 1024w, https:\/\/www.wpstaq.com\/wp-content\/uploads\/2021\/04\/www-does-not-exist-768x292.png 768w\" sizes=\"auto, (max-width: 1156px) 100vw, 1156px\" \/><\/p>\n<h2>Redirects and Website Deletion<\/h2>\n<p>If you delete a website in the Staq Panel, all associated redirects will also be deleted. Ensure that your redirects are backed up if you plan to remove a site.<\/p>\n<h2>Conclusion<\/h2>\n<p>The Staq Redirects tool provides a secure and efficient way to manage server-side redirects, supporting a variety of scenarios, including query strings and domain-level redirections. If you encounter any issues, contact Staq support for assistance.<\/p>\n","protected":false},"featured_media":29608,"parent":0,"template":"","class_list":["post-29884","knowledgebase","type-knowledgebase","status-publish","has-post-thumbnail","hentry","categories-redirects"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Server Redirects - 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\/server-redirects\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Server Redirects - Managed Hosting Platform for WordPress\" \/>\n<meta property=\"og:description\" content=\"The Redirects function in the Staq Panel is the most efficient and secure way to handle server-side redirections. Unlike WordPress plugins, which can pose security risks if compromised, the Staq Redirects tool ensures safe, server-level redirects. With this tool, you can: Export redirects via a CSV file Import existing redirects into Staq via CSV The&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wpstaq.com\/knowledgebase\/server-redirects\/\" \/>\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=\"2024-12-16T05:32:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/setup-domain-redirects-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/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=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/server-redirects\\\/\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/server-redirects\\\/\",\"name\":\"Server Redirects - Managed Hosting Platform for WordPress\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/server-redirects\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/server-redirects\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/setup-domain-redirects-1.png\",\"datePublished\":\"2021-04-22T09:09:15+00:00\",\"dateModified\":\"2024-12-16T05:32:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/server-redirects\\\/#breadcrumb\"},\"inLanguage\":\"en-sg\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/server-redirects\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-sg\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/server-redirects\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/setup-domain-redirects-1.png\",\"contentUrl\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/setup-domain-redirects-1.png\",\"width\":1000,\"height\":500},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/server-redirects\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.wpstaq.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Server Redirects\"}]},{\"@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-sg\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#organization\",\"name\":\"Staq\",\"alternateName\":\"WPStaq\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-sg\",\"@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":"Server Redirects - 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\/server-redirects\/","og_locale":"en_US","og_type":"article","og_title":"Server Redirects - Managed Hosting Platform for WordPress","og_description":"The Redirects function in the Staq Panel is the most efficient and secure way to handle server-side redirections. Unlike WordPress plugins, which can pose security risks if compromised, the Staq Redirects tool ensures safe, server-level redirects. With this tool, you can: Export redirects via a CSV file Import existing redirects into Staq via CSV The&hellip;","og_url":"https:\/\/www.wpstaq.com\/knowledgebase\/server-redirects\/","og_site_name":"Managed Hosting Platform for WordPress","article_publisher":"https:\/\/www.facebook.com\/staqhosting\/","article_modified_time":"2024-12-16T05:32:26+00:00","og_image":[{"width":1000,"height":500,"url":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/setup-domain-redirects-1.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wpstaq.com\/knowledgebase\/server-redirects\/","url":"https:\/\/www.wpstaq.com\/knowledgebase\/server-redirects\/","name":"Server Redirects - Managed Hosting Platform for WordPress","isPartOf":{"@id":"https:\/\/www.wpstaq.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wpstaq.com\/knowledgebase\/server-redirects\/#primaryimage"},"image":{"@id":"https:\/\/www.wpstaq.com\/knowledgebase\/server-redirects\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/setup-domain-redirects-1.png","datePublished":"2021-04-22T09:09:15+00:00","dateModified":"2024-12-16T05:32:26+00:00","breadcrumb":{"@id":"https:\/\/www.wpstaq.com\/knowledgebase\/server-redirects\/#breadcrumb"},"inLanguage":"en-sg","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wpstaq.com\/knowledgebase\/server-redirects\/"]}]},{"@type":"ImageObject","inLanguage":"en-sg","@id":"https:\/\/www.wpstaq.com\/knowledgebase\/server-redirects\/#primaryimage","url":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/setup-domain-redirects-1.png","contentUrl":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/setup-domain-redirects-1.png","width":1000,"height":500},{"@type":"BreadcrumbList","@id":"https:\/\/www.wpstaq.com\/knowledgebase\/server-redirects\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.wpstaq.com\/"},{"@type":"ListItem","position":2,"name":"Server Redirects"}]},{"@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-sg"},{"@type":"Organization","@id":"https:\/\/www.wpstaq.com\/#organization","name":"Staq","alternateName":"WPStaq","url":"https:\/\/www.wpstaq.com\/","logo":{"@type":"ImageObject","inLanguage":"en-sg","@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\/sg\/wp-json\/wp\/v2\/knowledgebase\/29884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wpstaq.com\/sg\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/www.wpstaq.com\/sg\/wp-json\/wp\/v2\/types\/knowledgebase"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wpstaq.com\/sg\/wp-json\/wp\/v2\/media\/29608"}],"wp:attachment":[{"href":"https:\/\/www.wpstaq.com\/sg\/wp-json\/wp\/v2\/media?parent=29884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}