The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. How to 301 trailing URLs to new domain home page - wildcard?

    How to 301 trailing URLs to new domain home page - wildcard?

    Technical SEO Issues
    1 1 58
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • CartoMark
      CartoMark last edited by

      How would I add a redirect rule so all old domain URLs redirect to a new domain? All the old pages no longer exist on a new website. The domains have been through several CMS platforms, so it would be unnecessary to recreate them.

      Problem is, they're indexed in search engines from the past 10 years, so it's causing a lot of 404s.

      Example: search "NARI Tampa Bay" and you'll find 2 old domains: nari-tampabay.com & nari-tampabay.org.

      The new domain is naritb.org

      Those 2 old domains are now pointed to the same nameservers as the new and listed as parked domains.

      Here's the current rules in htaccess:

      <code>RewriteEngine On
      RewriteCond %{HTTP_HOST} ^nari-tampabay.org [NC,OR]
      RewriteCond %{HTTP_HOST} ^www.nari-tampabay.org [NC]
      RewriteRule ^(.*)$ https://www.naritb.org/$1 [L,R=301]
      
      RewriteEngine On
      RewriteCond %{HTTP_HOST} ^nari-tampabay.com [NC,OR]
      RewriteCond %{HTTP_HOST} ^www.nari-tampabay.com [NC]
      RewriteRule ^(.*)$ https://www.naritb.org/$1 [L,R=301]</code>
      
      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      • 301 redirected all my pages to my new domain, now I have a problem with Google Search Console
        benoit_2018
        benoit_2018
        0
        2
        58

      • Home page indexed but not ranking...interior pages with thin content outrank home page??
        DougHosmer
        DougHosmer
        0
        3
        294

      • New Website, New URL, New Content - What do we do with the old site? Are 301's the only option?
        Valarlf
        Valarlf
        0
        3
        342

      • Should a 301 from a penalised domain to a new domain be removed?
        Ewan.Kennedy
        Ewan.Kennedy
        1
        5
        324

      • 301 Redirect for 3 Domains into 1 New Domain
        JaredMumford
        JaredMumford
        0
        3
        517

      • 301 for old domain to new domain - Joomla plugin or cpanel?
        blacey
        blacey
        0
        5
        1.9k

      • 301 Redirect Domain or 301 Redirect Domain + Interior Pages
        Room214
        Room214
        0
        7
        1.1k

      • 301 lots of old pages to home page
        dmac
        dmac
        1
        3
        826

      Get started with Moz Pro!

      Unlock the power of advanced SEO tools and data-driven insights.

      Start my free trial
      Products
      • Moz Pro
      • Moz Local
      • Moz API
      • Moz Data
      • STAT
      • Product Updates
      Moz Solutions
      • SMB Solutions
      • Agency Solutions
      • Enterprise Solutions
      • Digital Marketers
      Free SEO Tools
      • Domain Authority Checker
      • Link Explorer
      • Keyword Explorer
      • Competitive Research
      • Brand Authority Checker
      • Local Citation Checker
      • MozBar Extension
      • MozCast
      Resources
      • Blog
      • SEO Learning Center
      • Help Hub
      • Beginner's Guide to SEO
      • How-to Guides
      • Moz Academy
      • API Docs
      About Moz
      • About
      • Team
      • Careers
      • Contact
      Why Moz
      • Case Studies
      • Testimonials
      Get Involved
      • Become an Affiliate
      • MozCon
      • Webinars
      • Practical Marketer Series
      • MozPod
      Connect with us

      Contact the Help team

      Join our newsletter
      Moz logo
      © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
      • Accessibility
      • Terms of Use
      • Privacy