{"id":4034,"date":"2017-02-09T16:42:36","date_gmt":"2017-02-09T21:42:36","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=4034"},"modified":"2021-12-08T12:59:55","modified_gmt":"2021-12-08T17:59:55","slug":"redirect-old-website-new-website","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/","title":{"rendered":"Here’s How to Redirect Your Old Website to a New One"},"content":{"rendered":"\n

We won’t dive into the details as to why you would redirect your old website to a new one as that is subject to a whole discussion of itself so we will just go right into the topic at hand.<\/p>\n\n\n\n

Redirecting an old website to a new one brings about challenges generally related to SEO <\/a>(Search Engine Optimization) and downtime but if things are done properly then there should be no downtime or SEO issues at all.<\/p>\n\n\n\n

So you would want to make sure that a web address like:<\/p>\n\n\n\n

https://www.oldwebsite.com\/more-stuff-here\/<\/code><\/pre>\n\n\n\n

Properly redirects to its new equivalent like so:<\/p>\n\n\n\n

https://www.newwebsite.com\/more-stuff-here\/<\/code><\/pre>\n\n\n\n

The first step is you would need to set up the new domain name or website and have it configured to point to the document root of your current website or the location where the new website will be running from. This will be done at the domain level and on your webserver, the appropriate configurations will have to be done.<\/p>\n\n\n\n

Redirect an Old Website to a New One in Linux with Apache<\/h2>\n\n\n\n

For the Apache<\/a> web server, the following code will have to be placed in the .htaccess file in the document root of the old website changing the names of the websites as needed.<\/p>\n\n\n\n

 RewriteEngine On\n RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]\n RewriteCond %{HTTP_HOST} ^www.oldwebsite.com$\n RewriteRule (.*)$ http:\/\/www.newwebsite.com\/$1 [R=301,L]<\/code><\/pre>\n\n\n\n

The code above will be executed by the webserver whenever there is a request to it. The code will basically ensure a request has been made to the old domain name. If that is the case then the request will be redirected to the URI but now under the new domain name.<\/p>\n\n\n\n

It is important to perform the check for the old domain to avoid issues of double redirects which would occur without it. It is also important to note that the Apache ModRewrite module needs to be enabled. The code will perform a check and perform the redirect only if the module is active.<\/p>\n\n\n\n

Using Nginx to Redirect Website<\/h2>\n\n\n\n

Open the nginx.conf file and add the following code to it changing the oldwebsite.com and newwebsite.com as needed:<\/p>\n\n\n\n

server {\n listen 80;\n server_name oldwebsite.com;\n return 301 $scheme:\/\/newwebsite.com$request_uri;\n }<\/code><\/pre>\n\n\n\n

Redirect an Old Website to a New One on a Windows Server<\/h2>\n\n\n\n

Unless you are the server administrator then you will have to make a request to have it done for you through the “Internet Services Manager<\/strong>” interface. Generally, the process is simple and it uses a GUI<\/a> (Graphical User Interface).<\/p>\n\n\n\n

You start by accessing the “Properties<\/strong>” > “Home Directory<\/strong>” of the website you want to redirect. Next, you will need to access the “Default Web Site Properties<\/strong>” dialog. You will then need to Select “A redirection to a URL<\/strong>“. Thereafter in the “Redirect to<\/strong>:” field type in the new web address.<\/p>\n\n\n\n

Next, select “A permanent redirection for this source” then press the Ok button for the finish.<\/p>\n","protected":false},"excerpt":{"rendered":"

We won’t dive into the details as to why you would redirect your old website to a new one as that is subject to a whole discussion of itself so…<\/p>\n","protected":false},"author":1,"featured_media":4035,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,23],"tags":[58,286,354,400,530,531,591,635,636,643,646],"yoast_head":"\nHow to 301 Redirect an Old Website to a New Web Address<\/title>\n<meta name=\"description\" content=\"Here's how to redirect an old website to a new one using the features provided in Apache and Nginx on Linux and IIS on Windows servers\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to 301 Redirect an Old Website to a New Web Address\" \/>\n<meta property=\"og:description\" content=\"Here's how to redirect an old website to a new one using the features provided in Apache and Nginx on Linux and IIS on Windows servers\" \/>\n<meta property=\"og:url\" content=\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/\" \/>\n<meta property=\"og:site_name\" content=\"Brightwhiz.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/brightwhiz\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-09T21:42:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-08T17:59:55+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2017\/02\/redirect-old-website-to-new.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Michael Bright\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@brightwhizmag\" \/>\n<meta name=\"twitter:site\" content=\"@brightwhizmag\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Bright\" \/>\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\":\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/\"},\"author\":{\"name\":\"Michael Bright\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32\"},\"headline\":\"Here’s How to Redirect Your Old Website to a New One\",\"datePublished\":\"2017-02-09T21:42:36+00:00\",\"dateModified\":\"2021-12-08T17:59:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/\"},\"wordCount\":464,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/local.brightwhiz\/#organization\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2017\/02\/redirect-old-website-to-new.jpg\",\"keywords\":[\"Apache\",\"GUI\",\"Linux\",\"Nginx\",\"SEO\",\"Server\",\"Tools\",\"Web\",\"Web Applications\",\"Websites\",\"Windows\"],\"articleSection\":[\"Articles\",\"Guides\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/\",\"url\":\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/\",\"name\":\"How to 301 Redirect an Old Website to a New Web Address\",\"isPartOf\":{\"@id\":\"http:\/\/local.brightwhiz\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2017\/02\/redirect-old-website-to-new.jpg\",\"datePublished\":\"2017-02-09T21:42:36+00:00\",\"dateModified\":\"2021-12-08T17:59:55+00:00\",\"description\":\"Here's how to redirect an old website to a new one using the features provided in Apache and Nginx on Linux and IIS on Windows servers\",\"breadcrumb\":{\"@id\":\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#primaryimage\",\"url\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2017\/02\/redirect-old-website-to-new.jpg\",\"contentUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2017\/02\/redirect-old-website-to-new.jpg\",\"width\":1200,\"height\":630,\"caption\":\"Redirect Old Website to New\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/local.brightwhiz\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Here’s How to Redirect Your Old Website to a New One\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/local.brightwhiz\/#website\",\"url\":\"http:\/\/local.brightwhiz\/\",\"name\":\"Brightwhiz.com\",\"description\":\"Best Tech guides, Tutorials, and News\",\"publisher\":{\"@id\":\"http:\/\/local.brightwhiz\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/local.brightwhiz\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/local.brightwhiz\/#organization\",\"name\":\"Brightwhiz\",\"url\":\"http:\/\/local.brightwhiz\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png\",\"contentUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png\",\"width\":706,\"height\":135,\"caption\":\"Brightwhiz\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/brightwhiz\/\",\"https:\/\/twitter.com\/brightwhizmag\",\"https:\/\/instagram.com\/bright_whiz\/\",\"https:\/\/www.pinterest.com\/sobbayi\/\",\"https:\/\/www.youtube.com\/channel\/UC6sCdP_d_RiTIM7ErFT-PSQ\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32\",\"name\":\"Michael Bright\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g\",\"caption\":\"Michael Bright\"},\"sameAs\":[\"https:\/\/sobbayi.com\"],\"url\":\"http:\/\/local.brightwhiz\/author\/sobbayiadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to 301 Redirect an Old Website to a New Web Address","description":"Here's how to redirect an old website to a new one using the features provided in Apache and Nginx on Linux and IIS on Windows servers","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":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/","og_locale":"en_US","og_type":"article","og_title":"How to 301 Redirect an Old Website to a New Web Address","og_description":"Here's how to redirect an old website to a new one using the features provided in Apache and Nginx on Linux and IIS on Windows servers","og_url":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/","og_site_name":"Brightwhiz.com","article_publisher":"https:\/\/www.facebook.com\/brightwhiz\/","article_published_time":"2017-02-09T21:42:36+00:00","article_modified_time":"2021-12-08T17:59:55+00:00","og_image":[{"width":1200,"height":630,"url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2017\/02\/redirect-old-website-to-new.jpg","type":"image\/jpeg"}],"author":"Michael Bright","twitter_card":"summary_large_image","twitter_creator":"@brightwhizmag","twitter_site":"@brightwhizmag","twitter_misc":{"Written by":"Michael Bright","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#article","isPartOf":{"@id":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/"},"author":{"name":"Michael Bright","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32"},"headline":"Here’s How to Redirect Your Old Website to a New One","datePublished":"2017-02-09T21:42:36+00:00","dateModified":"2021-12-08T17:59:55+00:00","mainEntityOfPage":{"@id":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/"},"wordCount":464,"commentCount":0,"publisher":{"@id":"http:\/\/local.brightwhiz\/#organization"},"image":{"@id":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#primaryimage"},"thumbnailUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2017\/02\/redirect-old-website-to-new.jpg","keywords":["Apache","GUI","Linux","Nginx","SEO","Server","Tools","Web","Web Applications","Websites","Windows"],"articleSection":["Articles","Guides"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/","url":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/","name":"How to 301 Redirect an Old Website to a New Web Address","isPartOf":{"@id":"http:\/\/local.brightwhiz\/#website"},"primaryImageOfPage":{"@id":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#primaryimage"},"image":{"@id":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#primaryimage"},"thumbnailUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2017\/02\/redirect-old-website-to-new.jpg","datePublished":"2017-02-09T21:42:36+00:00","dateModified":"2021-12-08T17:59:55+00:00","description":"Here's how to redirect an old website to a new one using the features provided in Apache and Nginx on Linux and IIS on Windows servers","breadcrumb":{"@id":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/local.brightwhiz\/redirect-old-website-new-website\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#primaryimage","url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2017\/02\/redirect-old-website-to-new.jpg","contentUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2017\/02\/redirect-old-website-to-new.jpg","width":1200,"height":630,"caption":"Redirect Old Website to New"},{"@type":"BreadcrumbList","@id":"http:\/\/local.brightwhiz\/redirect-old-website-new-website\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/local.brightwhiz\/"},{"@type":"ListItem","position":2,"name":"Here’s How to Redirect Your Old Website to a New One"}]},{"@type":"WebSite","@id":"http:\/\/local.brightwhiz\/#website","url":"http:\/\/local.brightwhiz\/","name":"Brightwhiz.com","description":"Best Tech guides, Tutorials, and News","publisher":{"@id":"http:\/\/local.brightwhiz\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/local.brightwhiz\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/local.brightwhiz\/#organization","name":"Brightwhiz","url":"http:\/\/local.brightwhiz\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/","url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png","contentUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png","width":706,"height":135,"caption":"Brightwhiz"},"image":{"@id":"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/brightwhiz\/","https:\/\/twitter.com\/brightwhizmag","https:\/\/instagram.com\/bright_whiz\/","https:\/\/www.pinterest.com\/sobbayi\/","https:\/\/www.youtube.com\/channel\/UC6sCdP_d_RiTIM7ErFT-PSQ"]},{"@type":"Person","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32","name":"Michael Bright","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g","caption":"Michael Bright"},"sameAs":["https:\/\/sobbayi.com"],"url":"http:\/\/local.brightwhiz\/author\/sobbayiadmin\/"}]}},"_links":{"self":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts\/4034"}],"collection":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/comments?post=4034"}],"version-history":[{"count":0,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts\/4034\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/media\/4035"}],"wp:attachment":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/media?parent=4034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/categories?post=4034"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/tags?post=4034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}