Redirect All Links To New Domain

Consider this scenario. You have a site built on one domain. You now want to change your domain name and have all your previous links redirect there. The URLs themselves won’t change but only the domain would. The one thing you really don’t want to do is sit and write redirect rules for each page you have on the old site.

Thankfully there is a super simple way to achieve this. All you need is to create a .htaccess file and add a little code snippet below. If you already have a .htaccess file, you can put this at the end. Save this .htaccess file to the root of your site meaning the public_html or www folder.

redirect 301 / http://www.yournewdomain.com/

Easy huh?

Now I know many people are really nervous about editing with the .htaccess file. While it is true it can really mess up your site if done wrong however this is nothing you cannot recover from because it doesn’t affect your database or the files. So don’t get too worked up about it. The bark is worst than the bite – really.

Photo by chrisdlugosz

Do You Want A Hands-Free Business?

Then get this guide to help you systemize your business so you'll have more time working on your business.

!
!

Hey! I want to make sure you know what you're getting here. In addition to the guide, you will also receive our memo that includes special offers, announcements and of course actionable information.

Terms and Conditions checkbox is required.
Something went wrong. Please check your entries and try again.
Facebook Comments