How to properly code a 301 redirect for sub-domains
 by Kristi Hagen

How to properly code a 301 redirect for sub-domains.

  • How should I code a 301 redirect for sub-domains when...

    1. redirecting to a different sub-domain?
      redirected to:
    2. redirecting the sub-domain to the main domain?
      redirected to:


#1: Assuming you want everything within to be redirected to the same file names and directory structured at, you should add this code to your .htaccess file on the server:

RewriteRule ^list/(.*)$$1 [R=301,NC,L]

#2: To redirect the sub-domain to the main domain, add this redirect code to your .htaccess file also on the server

RewriteRule ^news/(.*)$$1 [R=301,NC,L]

That should do it.

Remember, we're always here to help you within FastAnswers. So, if you have questions or run into problems you're NOT alone in all of this!SEN article end


Already a member? Sign in here

Read the rest of this article,
and get all this for FREE for 30 days.

  • The Search Engine Strategies Updates for February 2020
  • SEN's Monthly Marketing Podcast for Strategies on the Go
  • Ultimate Guide to Avoiding Google Penalties
  • The Complete Site Audit Checklist
  • The Definitive Local Search Audit Checklist
  • 100's of Strategic SEO Articles and Q&As
  • The Internet Marketing Glossary
  • The Pro SEO's Local Search Directory List
  • 2019 Unfair Advantage SEO Beginner's Book
  • Pro's Ultimate WordPress Plugin Guide
  • The Vault: SEN's Internet Marketing Research Librarys
  • PLUS, as a Full SEN Basic Member, you'll be eligible for hundreds of dollars of discounts on SEO courses ranging from beginner to master on a variety of topics including organic search, local search, and social networking.

  • Your free trial is good for 30 days, until March 23rd, 2020.