{"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 Properly redirects to its new equivalent like so:<\/p>\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 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 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 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 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":"\nhttps://www.oldwebsite.com\/more-stuff-here\/<\/code><\/pre>\n\n\n\n
https://www.newwebsite.com\/more-stuff-here\/<\/code><\/pre>\n\n\n\n
Redirect an Old Website to a New One in Linux with Apache<\/h2>\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
Using Nginx to Redirect Website<\/h2>\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