{"id":859,"date":"2019-02-04T01:53:44","date_gmt":"2019-02-04T01:53:44","guid":{"rendered":"https:\/\/www.copahost.com\/blog\/?p=859"},"modified":"2020-05-31T14:08:17","modified_gmt":"2020-05-31T14:08:17","slug":"how-to-redirect-a-domain","status":"publish","type":"post","link":"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/","title":{"rendered":"How to redirect a domain: 2 easy methods"},"content":{"rendered":"<p>There are some methods available to redirect a domain name. In this article, we will explain how to do that. Note that here we will show how to redirect the whole domain (any path and any URL inside it). If you need to redirect only a specific URL (not the whole domain), we recommend <a href=\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-url-to-another-url\/\">this article<\/a>. Although a <a href=\"https:\/\/www.copahost.com\/blog\/domain-vs-url\/\" >URL redirect may look similar to a domain<\/a> redirect, the effect is pretty different.<\/p>\n<p>In these examples, there is no need to change the <a href=\"https:\/\/www.copahost.com\/blog\/dns-definition-what-dns-stand-for\/\">DNS Servers<\/a> of your domain name. We can redirect the whole <a href=\"https:\/\/www.copahost.com\/blog\/create-addon-parked-domains-cpanel\/\" >domain by cPanel<\/a> or by editing the .htaccess file. As you configure such redirection, you can easily rollback (undo) the changes. The configuration takes effect immediately after applied.\u00a0 Make sure to have the correct destination URL for the redirection. Otherwise, a <a href=\"https:\/\/www.copahost.com\/blog\/404-error-code\/\">404 error code<\/a> message can happen.<\/p>\n<h3>Method 1: How to redirect a domain using cPanel<\/h3>\n<p>Firstly, access your <a href=\"https:\/\/www.copahost.com\/blog\/free-cpanel-alternatives-centos-web-panel\/\">cPanel control panel<\/a>. Scroll a bit, until you find the option <strong>redirects<\/strong>, which is located under the <strong>Domains <\/strong>section<strong>.\u00a0 <\/strong>cPanel have full support for <a href=\"https:\/\/documentation.cpanel.net\/display\/76Docs\/Redirects\" target=\"_blank\" rel=\"noopener noreferrer\">domain redirections<\/a>.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-854\" src=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/02\/blog-redirect-url-to-another-url1.jpg\" alt=\"\" width=\"805\" height=\"312\" \/><\/p>\n<p>Then, you will reach the domain redirect configuration page.<\/p>\n<p>Now, select the source domain. For instance, our source domain is mysamplewebsite.com.<\/p>\n<p>You will place the target destination domain under the <strong>Redirects to<\/strong> section.<\/p>\n<p>And at the end of the page, make sure to select <strong>Wild Card Redirection<\/strong> option. This option will ensure that any page of your source domain will be redirected to the target domain.<\/p>\n<p>Then click <strong>Add<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-861 size-full\" src=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/02\/blog-domain-redirect-1.jpg\" alt=\"How to redirect a domain\" width=\"701\" height=\"585\" \/><\/p>\n<p>You are done and the domain is now being redirected.<\/p>\n<h3>Method 2: Redirect your domain using .htaccess<\/h3>\n<p>Firstly, you need to have <a href=\"https:\/\/www.copahost.com\/blog\/ftp-online-cpanel-web-ftp-client\/\">FTP<\/a> access to edit files in your server. You need to edit a file and name it <strong>.htaccess<\/strong>\u00a0 \u00a0. Make sure not to forget the &#8220;.&#8221; at the beginning of the file name.<\/p>\n<p>Simply add this like to the .htaccess file:<\/p>\n<pre class=\"lang:default decode:true\">Redirect \/ http:\/\/www.mynewwebsite.com\/<\/pre>\n<p>Then, just upload it to your server. If your <a href=\"https:\/\/www.copahost.com\/blog\/6-tips-for-a-perfect-backup-in-your-cpanel-server\/\" >server uses cPanel<\/a>, you have to place this file inside the \/public_html folder.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are some methods available to redirect a domain name. In this article, we will explain how to do that. Note that here we will show how to redirect the whole domain (any path and any URL inside it). If you need to redirect only a specific URL (not the whole domain), we recommend this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"class_list":["post-859","post","type-post","status-publish","format-standard","hentry","category-domain"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to redirect a domain: 2 easy methods - Copahost<\/title>\n<meta name=\"description\" content=\"Article explaining how to redirect a domain using cPanel, or using htaccess file. You can redirect a specific page, or the entire domain to another URL.\" \/>\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.copahost.com\/blog\/how-to-redirect-a-domain\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to redirect a domain: 2 easy methods - Copahost\" \/>\n<meta property=\"og:description\" content=\"Article explaining how to redirect a domain using cPanel, or using htaccess file. You can redirect a specific page, or the entire domain to another URL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/\" \/>\n<meta property=\"og:site_name\" content=\"Copahost\" \/>\n<meta property=\"article:published_time\" content=\"2019-02-04T01:53:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-31T14:08:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/02\/blog-redirect-url-to-another-url1.jpg\" \/>\n<meta name=\"author\" content=\"Gustavo Gallas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gustavo Gallas\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/\"},\"author\":{\"name\":\"Gustavo Gallas\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246\"},\"headline\":\"How to redirect a domain: 2 easy methods\",\"datePublished\":\"2019-02-04T01:53:44+00:00\",\"dateModified\":\"2020-05-31T14:08:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/\"},\"wordCount\":337,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/02\/blog-redirect-url-to-another-url1.jpg\",\"articleSection\":[\"Domain\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/\",\"url\":\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/\",\"name\":\"How to redirect a domain: 2 easy methods - Copahost\",\"isPartOf\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/02\/blog-redirect-url-to-another-url1.jpg\",\"datePublished\":\"2019-02-04T01:53:44+00:00\",\"dateModified\":\"2020-05-31T14:08:17+00:00\",\"description\":\"Article explaining how to redirect a domain using cPanel, or using htaccess file. You can redirect a specific page, or the entire domain to another URL.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#primaryimage\",\"url\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/02\/blog-redirect-url-to-another-url1.jpg\",\"contentUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/02\/blog-redirect-url-to-another-url1.jpg\",\"width\":805,\"height\":312},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.copahost.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to redirect a domain: 2 easy methods\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#website\",\"url\":\"https:\/\/www.copahost.com\/blog\/\",\"name\":\"Copahost\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.copahost.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\",\"name\":\"Copahost\",\"url\":\"https:\/\/www.copahost.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png\",\"contentUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png\",\"width\":223,\"height\":40,\"caption\":\"Copahost\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246\",\"name\":\"Gustavo Gallas\",\"description\":\"Graduated in Computing at PUC-Rio, Brazil. Specialized in IT, networking, systems administration and human and organizational development\u200b. Also have brewing skills.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/gustavo-gallas-107926196\/\"],\"url\":\"https:\/\/www.copahost.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to redirect a domain: 2 easy methods - Copahost","description":"Article explaining how to redirect a domain using cPanel, or using htaccess file. You can redirect a specific page, or the entire domain to another URL.","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.copahost.com\/blog\/how-to-redirect-a-domain\/","og_locale":"en_US","og_type":"article","og_title":"How to redirect a domain: 2 easy methods - Copahost","og_description":"Article explaining how to redirect a domain using cPanel, or using htaccess file. You can redirect a specific page, or the entire domain to another URL.","og_url":"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/","og_site_name":"Copahost","article_published_time":"2019-02-04T01:53:44+00:00","article_modified_time":"2020-05-31T14:08:17+00:00","og_image":[{"url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/02\/blog-redirect-url-to-another-url1.jpg"}],"author":"Gustavo Gallas","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Gustavo Gallas","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#article","isPartOf":{"@id":"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/"},"author":{"name":"Gustavo Gallas","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246"},"headline":"How to redirect a domain: 2 easy methods","datePublished":"2019-02-04T01:53:44+00:00","dateModified":"2020-05-31T14:08:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/"},"wordCount":337,"commentCount":0,"publisher":{"@id":"https:\/\/www.copahost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#primaryimage"},"thumbnailUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/02\/blog-redirect-url-to-another-url1.jpg","articleSection":["Domain"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/","url":"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/","name":"How to redirect a domain: 2 easy methods - Copahost","isPartOf":{"@id":"https:\/\/www.copahost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#primaryimage"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#primaryimage"},"thumbnailUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/02\/blog-redirect-url-to-another-url1.jpg","datePublished":"2019-02-04T01:53:44+00:00","dateModified":"2020-05-31T14:08:17+00:00","description":"Article explaining how to redirect a domain using cPanel, or using htaccess file. You can redirect a specific page, or the entire domain to another URL.","breadcrumb":{"@id":"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#primaryimage","url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/02\/blog-redirect-url-to-another-url1.jpg","contentUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2019\/02\/blog-redirect-url-to-another-url1.jpg","width":805,"height":312},{"@type":"BreadcrumbList","@id":"https:\/\/www.copahost.com\/blog\/how-to-redirect-a-domain\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.copahost.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to redirect a domain: 2 easy methods"}]},{"@type":"WebSite","@id":"https:\/\/www.copahost.com\/blog\/#website","url":"https:\/\/www.copahost.com\/blog\/","name":"Copahost","description":"","publisher":{"@id":"https:\/\/www.copahost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.copahost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.copahost.com\/blog\/#organization","name":"Copahost","url":"https:\/\/www.copahost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png","contentUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png","width":223,"height":40,"caption":"Copahost"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/386b3f1f79299d43f4ceb33d26428246","name":"Gustavo Gallas","description":"Graduated in Computing at PUC-Rio, Brazil. Specialized in IT, networking, systems administration and human and organizational development\u200b. Also have brewing skills.","sameAs":["https:\/\/www.linkedin.com\/in\/gustavo-gallas-107926196\/"],"url":"https:\/\/www.copahost.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/859","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/comments?post=859"}],"version-history":[{"count":7,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/859\/revisions"}],"predecessor-version":[{"id":2477,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/859\/revisions\/2477"}],"wp:attachment":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/media?parent=859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/categories?post=859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/tags?post=859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}