{"id":802,"date":"2020-05-25T07:21:24","date_gmt":"2020-05-25T07:21:24","guid":{"rendered":"http:\/\/ubiq.co\/tech-blog\/?p=802"},"modified":"2026-03-11T05:46:03","modified_gmt":"2026-03-11T05:46:03","slug":"redirect-page-another-domain-htaccess-file","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/","title":{"rendered":"How To Redirect Page To Another Domain With .htaccess File"},"content":{"rendered":"<p>When you move your website to a new domain, you need to redirect pages to another domain. Here&#8217;s how to easily redirect page to another domain with <a href=\"https:\/\/stackoverflow.com\/questions\/13170819\/what-is-htaccess-file\">.htaccess file<\/a> in Apache web server. There are multiple ways to redirect page to another domain. We will look at each of them.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#How_To_Redirect_Page_To_Another_Domain_With_htaccess_File\" >How To Redirect Page To Another Domain With .htaccess File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#1_Enable_mod_rewrite\" >1. Enable mod_rewrite<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#2_Enable_htaccess_in_Apache_Server\" >2. Enable .htaccess in Apache Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#3_Create_htaccess_file\" >3. Create .htaccess file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#4_Redirect_Page_to_Another_Domain_using_htaccess_file\" >4. Redirect Page to Another Domain using .htaccess file<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#Redirect_Page_to_Another_Domain_using_Redirect\" >Redirect Page to Another Domain using Redirect<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#Redirect_Page_to_Another_Domain_using_RedirectMatch\" >Redirect Page to Another Domain using RedirectMatch<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#5_Restart_Apache_Server\" >5. Restart Apache Server<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"How_To_Redirect_Page_To_Another_Domain_With_htaccess_File\"><\/span>How To Redirect Page To Another Domain With .htaccess File<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Here are the steps to redirect page to another domain with .htaccess file.\u00a0Please ensure that you have enabled mod_rewrite in your Apache web server configuration. Only then your .htaccess configuration will be applied by Apache server.<\/p>\n<p>If you have enabled htaccess using mod_rewrite, you can skip to step 4.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"1_Enable_mod_rewrite\"><\/span>1. Enable mod_rewrite<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Open terminal and run the following command to enable mod_rewrite on Ubuntu\/Debian systems.<\/p>\n<pre>$ sudo a2enmod rewrite\n<\/pre>\n<p>If mod_rewrite is already enabled, you will see an alert message.<\/p>\n<p>Restart Apache web server<\/p>\n<pre>$ sudo systemctl restart apache2\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"2_Enable_htaccess_in_Apache_Server\"><\/span>2. Enable .htaccess in Apache Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>By default, Apache does not allow the use of .htaccess file. So open the default Apache server configuration file<\/p>\n<pre>$ sudo vi \/etc\/apache2\/sites-available\/000-default.conf<\/pre>\n<p>Add the following lines just before <em>&lt;\/VirtualHost&gt;<\/em> line.<\/p>\n<pre>&lt;Directory \/var\/www\/html&gt;\n   Options Indexes FollowSymLinks MultiViews\n   AllowOverride All\n   Require all granted\n&lt;\/Directory&gt;\n<\/pre>\n<p>Restart Apache web server<\/p>\n<pre>$ sudo systemctl restart apache2\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"3_Create_htaccess_file\"><\/span>3. Create .htaccess file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Open terminal and create .htaccess file<\/p>\n<pre>$ sudo vi \/var\/www\/html\/.htaccess\n<\/pre>\n<p>Make sure to add the following line at the top of your .htaccess file<\/p>\n<pre>RewriteEngine on<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"4_Redirect_Page_to_Another_Domain_using_htaccess_file\"><\/span>4. Redirect Page to Another Domain using .htaccess file<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Let&#8217;s say you want to <a href=\"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/\">redirect<\/a> page <em>\/product.html<\/em> to another domain\u00a0<em>www.newsite.com<\/em>.\u00a0There are multiple ways to redirect page to another domain using .htaccess file.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Redirect_Page_to_Another_Domain_using_Redirect\"><\/span>Redirect Page to Another Domain using Redirect<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Add the following\u00a0<em>Redirect<\/em> directive to redirect your page to another domain. <em>Redirect<\/em> statement requires 2 arguments &#8211; source URL path and destination URL path. You can use either absolute URL paths or relative URL paths<\/p>\n<pre>Redirect \/product.html http:\/\/www.newsite.com\/product.html<\/pre>\n<p>If you want to permanently redirect page to another domain, just add 301 after Redirect directive, as shown<\/p>\n<pre>Redirect 301 \/product.html http:\/\/www.newsite.com\/product.html<\/pre>\n<p>If you want to redirect all pages to new domain root, just add the following line to .htaccess<\/p>\n<pre>Redirect 301 \/ http:\/\/www.newsite.com\/<\/pre>\n<p>Redirect directive will redirect all URLs that begin with the URL prefix (e.g \/product.html) you specified.\u00a0<em>Redirect<\/em> will also redirect URLs with parameters to new domain.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Redirect_Page_to_Another_Domain_using_RedirectMatch\"><\/span>Redirect Page to Another Domain using RedirectMatch<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You can also use\u00a0<em>RedirectMatch<\/em> directive to redirect your page to another domain.<\/p>\n<p>Redirect statement will redirect pages that begin with specified URL prefix but RedirectMatch will redirect all pages that match a specified Regular expression<\/p>\n<p><em>RedirectMatch<\/em> statement requires 2 arguments &#8211; regular expression to match and destination URL path.<\/p>\n<pre>RedirectMatch ^\/product.html http:\/\/www.newsite.com\/product.html<\/pre>\n<p>If you want to permanently redirect page to another domain, just add 301 after RedirectMatch directive, as shown<\/p>\n<pre>RedirectMatch 301 ^\/product.html http:\/\/www.newsite.com\/product.html<\/pre>\n<p>RedirectMatch directive will redirect all URLs that begin with the Regex (e.g \/product.html) you specified.\u00a0<em>RedirectMatch<\/em> will also redirect URLs with parameters to new domain<\/p>\n<h2><span class=\"ez-toc-section\" id=\"5_Restart_Apache_Server\"><\/span>5. Restart Apache Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Restart Apache web server<\/p>\n<pre>$ sudo systemctl restart apache2\n<\/pre>\n<p>Now your Apache web server will automatically redirect page to another domain.<\/p>\n<p><a href=\"http:\/\/ubiq.co\/\">Ubiq<\/a>\u00a0makes it easy to visualize data in minutes, and monitor in real-time dashboards.\u00a0<a href=\"http:\/\/ubiq.co\/accounts\/register\">Try it<\/a>\u00a0Today!<\/p>\n<p>Also read:<br \/>\n<a href=\"https:\/\/ubiq.co\/tech-blog\/disable-apache-directory-listing\/\">How to Disable Directory Listing in Apache<\/a><br \/>\n<a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-redirect-all-pages-to-new-domain\/\">How to Redirect All Pages to Another Domain in Apache<\/a><br \/>\n<a href=\"https:\/\/ubiq.co\/tech-blog\/set-access-control-allow-origin-cors-headers-apache\/\">How to Set CORS headers in Apache<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you move websites, you need to redirect page to another domain. Here&#8217;s how to redirect page to another domain with .htaccess file in Apache web server.<\/p>\n","protected":false},"author":1,"featured_media":813,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[4,45,5,33],"class_list":["post-802","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apache","tag-htaccess","tag-301-redirect","tag-redirect","tag-url-redirection"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Redirect Page To Another Domain With .htaccess File - Ubiq BI<\/title>\n<meta name=\"description\" content=\"When you move websites, you need to redirect page to another domain. Here&#039;s how to redirect page to another domain with .htaccess file in Apache web server.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Redirect Page To Another Domain With .htaccess File - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"When you move websites, you need to redirect page to another domain. Here&#039;s how to redirect page to another domain with .htaccess file in Apache web server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-25T07:21:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-11T05:46:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/redirect-page-to-another-domain-htaccess.png\" \/>\n\t<meta property=\"og:image:width\" content=\"758\" \/>\n\t<meta property=\"og:image:height\" content=\"377\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How To Redirect Page To Another Domain With .htaccess File\",\"datePublished\":\"2020-05-25T07:21:24+00:00\",\"dateModified\":\"2026-03-11T05:46:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/\"},\"wordCount\":519,\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/redirect-page-to-another-domain-htaccess.png?fit=758%2C377&ssl=1\",\"keywords\":[\".htaccess\",\"301 redirect\",\"redirect\",\"url redirection\"],\"articleSection\":[\"Apache\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/\",\"url\":\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/\",\"name\":\"How To Redirect Page To Another Domain With .htaccess File - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/redirect-page-to-another-domain-htaccess.png?fit=758%2C377&ssl=1\",\"datePublished\":\"2020-05-25T07:21:24+00:00\",\"dateModified\":\"2026-03-11T05:46:03+00:00\",\"author\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"When you move websites, you need to redirect page to another domain. Here's how to redirect page to another domain with .htaccess file in Apache web server.\",\"breadcrumb\":{\"@id\":\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/redirect-page-to-another-domain-htaccess.png?fit=758%2C377&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/redirect-page-to-another-domain-htaccess.png?fit=758%2C377&ssl=1\",\"width\":758,\"height\":377,\"caption\":\"redirect page to another domain htaccess\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ubiq.co\/tech-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Redirect Page To Another Domain With .htaccess File\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#website\",\"url\":\"https:\/\/ubiq.co\/tech-blog\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/\"],\"url\":\"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Redirect Page To Another Domain With .htaccess File - Ubiq BI","description":"When you move websites, you need to redirect page to another domain. Here's how to redirect page to another domain with .htaccess file in Apache web server.","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:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/","og_locale":"en_US","og_type":"article","og_title":"How To Redirect Page To Another Domain With .htaccess File - Ubiq BI","og_description":"When you move websites, you need to redirect page to another domain. Here's how to redirect page to another domain with .htaccess file in Apache web server.","og_url":"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2020-05-25T07:21:24+00:00","article_modified_time":"2026-03-11T05:46:03+00:00","og_image":[{"width":758,"height":377,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/redirect-page-to-another-domain-htaccess.png","type":"image\/png"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How To Redirect Page To Another Domain With .htaccess File","datePublished":"2020-05-25T07:21:24+00:00","dateModified":"2026-03-11T05:46:03+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/"},"wordCount":519,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/redirect-page-to-another-domain-htaccess.png?fit=758%2C377&ssl=1","keywords":[".htaccess","301 redirect","redirect","url redirection"],"articleSection":["Apache"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/","url":"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/","name":"How To Redirect Page To Another Domain With .htaccess File - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/redirect-page-to-another-domain-htaccess.png?fit=758%2C377&ssl=1","datePublished":"2020-05-25T07:21:24+00:00","dateModified":"2026-03-11T05:46:03+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"When you move websites, you need to redirect page to another domain. Here's how to redirect page to another domain with .htaccess file in Apache web server.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/redirect-page-to-another-domain-htaccess.png?fit=758%2C377&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/redirect-page-to-another-domain-htaccess.png?fit=758%2C377&ssl=1","width":758,"height":377,"caption":"redirect page to another domain htaccess"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/redirect-page-another-domain-htaccess-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How To Redirect Page To Another Domain With .htaccess File"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/05\/redirect-page-to-another-domain-htaccess.png?fit=758%2C377&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-cW","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=802"}],"version-history":[{"count":19,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/802\/revisions"}],"predecessor-version":[{"id":10685,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/802\/revisions\/10685"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/813"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}