We Need Website

Blog

  • Home
  • How to
  • Hosting
  • Server
  • WordPress
  • Applications

How to redirect subfolder to a new domain [No plugin required]

Posted by Praan Kumar Leave a Comment

Share this

If you are looking to redirect a subfolder to a new domain or want to create a new website on it, then this tutorial will solve your problem. Suppose you have a website example.com and simultaneously you are also running a website on a subfolder say subfolder (i.e. www.example.com/subfolder/), now you want to redirect the subfolder to a new separate website called www.newexample.com. Follow the below steps to do this-

Step 1: Open the file manager of your CMS or access it via FTP.

Step 2: Open the filename in the root directory called .htaccess

Step 3: Paste the following code into the .htaccess file

### BEGIN Redirect /example subdirectory to newexample.com
Options +FollowSymLinks
RewriteEngine On
Redirect 301 /subfolder https://newexample.com/
### END Redirect /example subdirectory to newexample.com

Note: Don’t forget to replace the domain name with your new domain name.

Also, replace the word subfolder with your old folder name.

If you to redirect the whole domain, then read this article.

 

Filed Under: Coding

About Praan Kumar

Co-founder of weneedwebsite.com
Marketing Advisor, Software Tester, Webmaster, & SEO Professional.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Technologies We Use

  • Hosting: Cloudways
  • Theme: Genesis Framework
  • Keyword Research: Semrush

Recent Posts

  • Learn How to Do Keywords Research Properly and Generate Traffic for Blogs
  • How to redirect subfolder to a new domain [No plugin required]
  • List of Instagram Photos & Videos Downloader Tools & Website
  • How To Create A WordPress Website: Step-by-Step Guide
  • Top 5 Best Push Notifications Services for Growth of Your Business & Blogging

Recent Comments

  • Ashish on Javascript code to Reduce Bounce Rate by 50% using Force redirects method
  • edward on How to Embed Tik Tok Videos Inside a html Web Page / WordPress / CMS
  • CHINWENDU IGBAJI on Step by Step Guide How to Install WordPress on Subdirectory on Cloudways
  • Yusuf Khan on How to Install Viral Festival Wishing Script on WordPress Blogs
  • dipenkumar on How to Install Viral Festival Wishing Script on WordPress Blogs

Copyright © 2023 We Need Website | Privacy Policy . About Us . Contact Us