Title: Permanent URL Redirect
Last modified: August 20, 2016

---

# Permanent URL Redirect

 *  Resolved [Ron Strilaeff](https://wordpress.org/support/users/ronstrilaeff/)
 * (@ronstrilaeff)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/)
 * This is not a wordpress specific question but surely someone here has done the
   same thing as I am needing to do very soon.
 * I have oldone.com which has many links to it from the rest of the web
 * I created a multisite called main.net with a subdomain prepared as newone.main.
   net to which all the posts, pages and images from oldone.com will be imported.
 * I know how to do all of the above.
 * What I don’t know is where exactly do I make the reference to tell the world 
   that everything from oldone.com can now be found forever at newone.main.net ?
 * Of course I want all the permalinks to keep working so that this:
    **[http://oldone.com/2012/10/post-title/](http://oldone.com/2012/10/post-title/)**
 * would now exist at
    **[http://newone.main.net/2012/10/post-title/](http://newone.main.net/2012/10/post-title/)**
 * I’m hoping that I do not have to maintain a site at oldone.com forever with some
   redirect code but that some magic DNS reference can make it happen with zero 
   maintenance. The intention is that anyone who clicked on a link to oldone.com
   would be automatically transported to the corresponding page on the new site 
   with no delays or messages.
 * Also, I’m willing to “own” the domain name oldone.com forever if necessary.
 * I think this is a routine thing but have never had to do it before now. Thanks
   for your expert advice!

Viewing 13 replies - 1 through 13 (of 13 total)

 *  [wpismypuppet](https://wordpress.org/support/users/wordpressismypuppet/)
 * (@wordpressismypuppet)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140128)
 * If you are running on an Apache server with rights to create an .htaccess, all
   your problems will simply vanish! Follow these rules:
 * [http://jesperastrom.com/seo/how-to-do-a-htaccess-301-redirect/](http://jesperastrom.com/seo/how-to-do-a-htaccess-301-redirect/)
 * We’ve had to do this many times in our career. This is the best approach to keeping
   SEO in tack.
 *  [DOOMNEZEU](https://wordpress.org/support/users/doomnezeu/)
 * (@doomnezeu)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140132)
 * Simply to redirect from 1 site to another link are simple:
 * 1. Create 1 file named index.html
 * 2. Add this script to the clean file:
 *     ```
       <html>
       	<head>
       		<title>Redirecting...</title>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
       <meta name="robots" content="noindex,nofollow" />
       <meta http-equiv="refresh" content="0; url=http://www.yournewsite.com/" />
   
       </html>
       ```
   
 * Where [http://www.yournewsite.com/](http://www.yournewsite.com/) you can change
   to the new site.
 * I hope you enjoy with this info!
 *  Thread Starter [Ron Strilaeff](https://wordpress.org/support/users/ronstrilaeff/)
 * (@ronstrilaeff)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140133)
 * Hi, thanks. Yes I do in fact. I have several domains pointing at different folders
   on my host. So which .htaccess file to I put the redirect code in?
 * oldone.com lives at /oc and has its own .htaccess file.
 * main.net lives at /mn with the subdomain flavor of the wp-multisite .htaccess
   file.
 * And wpismypuppet you are right the whole point of this is to maintain the SEO
   and never abandon the thousands of archived links floating around out there. 
   Some one clicking on and old link will get exactly the same content but the address
   bare will show the new URL. New links will be made to the new url, but the old
   ones could be there forever.
 * -Ron
 *  [DOOMNEZEU](https://wordpress.org/support/users/doomnezeu/)
 * (@doomnezeu)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140139)
 * Nops you must put this file in the new domain hosting NOT in .htaccess.
 * So when a guy click on new domain , this file index.html from your new domain
   will redirect this users to the oldone.com automaticly. You DO NOT must to edit.
   htaccess
 * Like i said create on your new hoster an **index.html **
 * if you dont have one, (if you have it cleanned this) and add the script what 
   i give you, something like this :
 *     ```
       <html>
       	<head>
       		<title>Redirecting...</title>
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
       <meta name="robots" content="noindex,nofollow" />
       <meta http-equiv="refresh" content="0; url=http://www.oldone.com/" />
   
       </html>
       ```
   
 * Thats it! No need other thing! I hope you understand it!
 * Simple!
 *  [DOOMNEZEU](https://wordpress.org/support/users/doomnezeu/)
 * (@doomnezeu)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140140)
 * If you have multi-domains create same copy of index.html in every folder were
   you want to redirect. All domain you want will be redirected to this old-domain.
 *  Thread Starter [Ron Strilaeff](https://wordpress.org/support/users/ronstrilaeff/)
 * (@ronstrilaeff)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140148)
 * Thanks for the details doomnezeu. However, I’m thinking the 301 redirect is what
   I want. I responded “yes I do..” to wpismypuppet’s comment about Apache and ability
   to modify my .htaccess.
 * I want the oldone.com to never be seen but have all visitors immediatley be redirected
   in the background to newone.main.net without that extra bounce to the old site.
   Imagine that canada.com got absorbed by usa.net, we would not want a million 
   visitors hitting canada.com/content/index.html before being sent to state51.usa.
   net/content.
 *  [wpismypuppet](https://wordpress.org/support/users/wordpressismypuppet/)
 * (@wordpressismypuppet)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140157)
 * You want to put the redirects here:
 * > oldone.com lives at /oc and has its own .htaccess file.
 * You will have to leave the old domain up for a bit, until Google has indexed 
   all the new stuff. Of course, delete all the files and just leave the .htaccess
   file. After a month or two, kill the old domain completely.
 * If your file structure is exactly the same from domain to domain (ie. olddomain.
   com/myfile/ -> newdomain.com/myfile/) then you can do a simple:
 * `redirect 301 / http://www.newdomain.com/`
 * If ANY of the file structure has changed… then you’ll need one redirect for each
   page that has a new file structure. For example, if you had olddomain.com/myfile/,
   and the new structure is newdomain.com/myfolder/myfile/, then you’ll need:
 * `redirect 301 /myfile/ http://www.newdomain.com/myfolder/myfile/`
 * Again, one of those for each page that has a new home. The very last line in 
   your .htaccess file would be the:
 * `redirect 301 / http://www.newdomain.com/`
 * From above… keep in mind that you need a blank line at the VERY end of the .htaccess
   file. Read this document too… talks more about SEO reasons and has more details.
   Plus a little humor 🙂
 * [http://www.bruceclay.com/blog/2007/03/how-to-properly-implement-a-301-redirect/](http://www.bruceclay.com/blog/2007/03/how-to-properly-implement-a-301-redirect/)
 *  [wpismypuppet](https://wordpress.org/support/users/wordpressismypuppet/)
 * (@wordpressismypuppet)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140158)
 * [@doomnezeu](https://wordpress.org/support/users/doomnezeu/)
 * While your method WILL work just fine, it will absolutely kill any and all SEO
   you might have already for your website. Your method is only a good option if
   you don’t care about SEO.
 *  [wpismypuppet](https://wordpress.org/support/users/wordpressismypuppet/)
 * (@wordpressismypuppet)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140240)
 * I should mention that if possible, you should leave the 301s in place indefinitely,
   as anyone **linked** to your site from somewhere else will get a 404 once you
   delete the 301s. And in that case, your SEO will take a hit losing all those 
   linked people (has nothing to do with Google, and only you know if people are
   linking your website through SEO tools).
 * However, it may not pay to keep a whole domain for this reason. Weight carefully
   the money vs. the ranking and make a choice.
 *  [DOOMNEZEU](https://wordpress.org/support/users/doomnezeu/)
 * (@doomnezeu)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140271)
 * If you want to cloak oldomain , by new domain you can cloak in your DNS server,
   for example like me i use for this zoneedit.com , or :
    try on your hoster to
   create an alias like other my domain: examplu:
 * My domain [http://www.legendofmir.ro](http://www.legendofmir.ro) are hosted in
   the main /httpdocs/ of my hosting site.
 * For others domain [http://www.αγγελιεςεργασιας.com](http://www.αγγελιεςεργασιας.com)(
   now underconstruction) i made an folder named aggelies in the /httpdocs/ of [http://www.legendofmir.ro](http://www.legendofmir.ro)
 * I make it an alias in the option of my hosting , and i redirect from there option,
   to the [http://www.legendofmir.ro/aggelies](http://www.legendofmir.ro/aggelies)(
   eg.) and when i adreess on IE [http://www.αγγελιεςεργασιας.com](http://www.αγγελιεςεργασιας.com),
   only this name appear, not [http://www.legendofmir.ro/aggelies](http://www.legendofmir.ro/aggelies).
 * I hope you understand me, this 2 way with alias , or using an DNS server like
   zoneedit.com. (are free and the best in the world !!!)
 * Thats it , enjoy with new infos! 🙂
 * DOOMNEZEU
 *  [DOOMNEZEU](https://wordpress.org/support/users/doomnezeu/)
 * (@doomnezeu)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140272)
 * My mistake my are site [http://www.αγγελιεςεργασιας.gr](http://www.αγγελιεςεργασιας.gr)
   not .com.
 * Anyway dsnt matter.
 *  Thread Starter [Ron Strilaeff](https://wordpress.org/support/users/ronstrilaeff/)
 * (@ronstrilaeff)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140342)
 * Thanks guys.
 * Here is [my write up](http://strilaeff.net/blog/2012/10/url-redirection-for-wordpress-multisite-subdomains/)
   of how I plan to proceed.
 * And so you don’t have to follow that link, here is the redirect code I’m going
   to use (the 302 will become a 301):
 *     ```
       RewriteEngine on
       RewriteCond %{HTTP_HOST} ^([^.:]+\.)*testsyte1\.com\.?(:[0-9]*)?$ [NC]
       RewriteRule ^(.*)$ http://one.testyng.com/$1 [R=302,L]
       RewriteCond %{HTTP_HOST} ^([^.:]+\.)*testsyte2\.com\.?(:[0-9]*)?$ [NC]
       RewriteRule ^(.*)$ http://two.testyng.com/$1 [R=302,L]
       ```
   
 * It works very well on my test sites. The live sites will be a bit more complicated
   since most of the content is in 3rd party tables and needs to be converted to
   a new custom post type.
 * But that’s for another day.
 *  [wpismypuppet](https://wordpress.org/support/users/wordpressismypuppet/)
 * (@wordpressismypuppet)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140384)
 * Glad I could help. Also I read through your post on “URL Redirection For WordPress
   Multisite Subdomains” and it’s good… but there are some steps that could be simplified.
   Especially if the person has access to the SQL database. If you’d like some help
   writing that up, let me know.
 * On a daily basis, we create “test” sites on our website using sub-domains. When
   the site is ready to go live, we port the entire WordPress site over to their
   domain. Similar to what you are doing here. The steps we use are shorter and 
   easier and don’t require recreating anything, even the widgets.

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Permanent URL Redirect’ is closed to new replies.

## Tags

 * [multisite](https://wordpress.org/support/topic-tag/multisite/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 3 participants
 * Last reply from: [wpismypuppet](https://wordpress.org/support/users/wordpressismypuppet/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/permanent-url-redirect/#post-3140384)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
