Skip to main content
2 of 3
Thanks RobertHue
Mayeenul Islam
  • 12.9k
  • 21
  • 85
  • 169

###WAY #1 - cPanel### I assume your host is using cPanel managing your Server.

Browse domainname.com/cpanel, login their with cPanel credential:
enter image description here

Change the values according the following image:
enter image description here

Don't forget to check the "Wildcard Redirect" to redirect all the subfolder/subpages also (Thanks to @RobertHue). Add the redirection and you are done.

###WAY #2 - .htaccess### Open up your .htaccess of domainname.com/blog/ in edit mode. Put the following code there (I made it using WebConfs.com Redirect Generator):

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://newdomainname.com/$1 [R=301,L]

Save it. And yala!

##EDIT## That's well said by @RobertHue. I did not mention the subfolder or subpages redirection. So I edited my answer, changed the attached images and posted new code. Thanks a lot @RobertHue for pointing the important things.

Mayeenul Islam
  • 12.9k
  • 21
  • 85
  • 169