Code 301: Everlasting redirect that can be utilized for pages or on a complete website. Search engines like google interpret this redirection and mechanically replace their index by changing the outdated URL(s) with the brand new one(s).
WordPress, change Area Identify
I lately modified the area title of my website, this operation though somewhat easy requires nonetheless to be rigorous and ordered. Earlier than doing the precise 301 redirect, you might want to transfer WordPress firstTo do that, there are a number of strategies:
Possibility 1 – Copy, paste and use
- Set up WordPress in your new area
- Utilizing FTP software program (Filezilla), copy all of the recordsdata out of your outdated area to the brand new one
- Export the outdated database (BDD) and import it into your new database
- Make the modifications within the new database, change anciendomaine.com par nouveaudomaine.comone can find the detailed process referring to the BDD on Transfer WordPress
- Then edit your WP-config.php file and alter the DB associated values
- Login to WordPress admin and alter the positioning URL in Settings>>Basic
Benefit : The quickest solution to implement, for an similar copy.
Inconvenience : We take the identical and begin once more. By this I imply that you simply reinstall your WordPress identically (articles, pages, theme, plugins, database tables, and many others.).
Possibility 2 – Export and Import
- Export your total outdated WordPress through Instruments>>Export, select all content material and reserve it to your exhausting drive
- Set up a model new WordPress in your new area and set up your theme
- On the latter, (re)set up the plugins you (actually) want
- Import all content material (pages, posts, photos, and many others) to the brand new area with Instruments>>Import
- Clear up the brand new database, certainly the relative hyperlinks in your articles, pages, nonetheless level to the outdated URL, use the process described on Transfer WordPress
- It is over, right here you’re with a “new” WordPress on a brand new area
Benefit : Helpful if you’re not comfy with FTP.
Inconvenience : The process is longer and requires you to (re)configure some parts of your WP.
Tip for the DB
In your database and as a bonus for the lazy folks of which I’m a component, good friend Stéphane handed me a PHP file Protected Search Exchange which permits the automation of URL modifications within the DB. In abstract, this file means that you can change in 3 clicks all of the relative URLs of the outdated area and make them level to the brand new one.
Put in on the root of your area, it mechanically retrieves your BDD info and logins and makes modifications to the tables of your alternative. Throughout its use, the latter didn’t miss any URL and the method lasted lower than 3 seconds. Please notice that when your modifications have been made, remember to delete this file!
You too can use the plugin Full replace urlsthe latter will deal with every little thing, you simply should enter your URLs and the plugin will make modifications to the pages, articles, plugins but additionally to your database… As Georges says so nicely: What else?
We placed on our 301, the redirection
Edit the .htaccess file
If you recognize that your deal with has modified, and even when WordPress is aware of it too, inform your self that this isn’t the case for everybody. You now have to proceed with the precise redirection. Begin by modifying your outdated area’s .htaccess file with the next code:
RewriteEngine On RewriteCond %HTTP_HOST ^anciendomaine.com$ [NC] RewriteRule ^(.*)$ [R=301,L]
As soon as this redirection has been arrange, any Web person who enters the next deal with: anciendomaine/monarticlI shall be mechanically redirected to newdomain/myarticle.
Google Webmaster Instruments
Then go for a stroll round the home Google Webmaster Instruments (GWT) and register your new area. On the administration web page of your outdated area, go to Configuration>>Change of deal with and choose the brand new area within the record then proceed with the change. This process will help you maintain (in concept) your web page rank.
It’s advisable to maintain management of the outdated area for at the least 180 days. Your website, as soon as put in on its new area, will lose about 30 to 50% of its regular visitors, it is going to take a mean of two to three months for a return to regular. Rigorously monitor your 404s (error pages) and make changes if vital.
Lastly, remember
- your sitemap and ship it to GWT
- your signatures of emails, boards
- your hyperlink exchanges, backlinks
- your social networks
- you RSS stream
- and many others…
I hope this tutorial shall be helpful to you in your subsequent transfer.don’t hesitate to ship me your feedback or enhancements.
Share the submit “WordPress on its 301, change of area”