Keep All Sub URL Same Even Domain Name Change

Many times we have an in CMS and eCommerce website to change the domain due to maintenance or other reason but the main headache is the sub URL (categories or collection) should work as it is otherwise we need to write the 301 URL redirect for each and every URL to not get the SEO errors. Let’s take a look here, Without Domain Name change how to keep all Sub URLs the same as?

This tutorial will be helpful for the following CMS:

  1. WordPress development
  2. Joomla development
  3. Drupal development

An eCommerce platform that gets help from this:

  1. Magento eCommerce Store Development
  2. BigCommerce Online Store development
  3. Volusion Store Development
  4. VirtueMart

So here is the simple and easy option for keeping all URLs the same while changing the domain name that will work using the add the few lines in the htaccess file (if the file is not available create it .htaccess).

Append the following code in the file.

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(?:www.)domain.com$ [NC]
RewriteRule ^ https://newdomain.com%{REQUEST_URI} [L,R=301]
Chetan Sheladiya

Driven by emerging tech stacks, Mr. Chetan has over a decade of experience in the IT and digital landscape. He specializes in online business marketing, web and mobile app development, and other niches. He loves sharing his ideas and opinions with like-minded people.

Recent Posts

Shopify Dropshipping 2024: The Ultimate eCommerce Guide!

The eCommerce world is rising and multiplying with every business and customer demand. Many eCommerce…

1 week ago

What is Artificial Intelligence (AI)? A Comprehensive Guide!

Hey Siri, Alexa, or Google Assistance, please show me the best bakery nearby or help…

1 week ago

History of Artificial Intelligence (AI): The Rise of Machines & Technology

Throughout the centuries leading up to the 1950s, numerous philosophical and logical concepts emerged, laying…

2 weeks ago

Top 10 Mistakes to Avoid During eCommerce Website Development!

In today's tech-driven world, bringing businesses online has become a new norm. And why not?…

3 weeks ago

Unleashing Efficiency: Streamline IT Operations with RPA!

Organizations tirelessly seek ways to optimize operations and boost productivity in today's fast-paced digital landscape.…

3 weeks ago

What is AWS Data Pipeline? Role, Components, and Benefits Explained!

The cloud giant Amazon Web Services (AWS) is a hub for many dynamic and game-changing…

3 weeks ago