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

      • Should we 301 redirect our old domain to the new domain
        sitestrux
        sitestrux
        0
        7
        440

      • Is 301 redirecting all old URLS after a new site redesign to the root domain bad for SEO?
        Vahe.Arabian
        Vahe.Arabian
        0
        12
        2.6k

      • New project old domain should I 301 redirect while new sites built
        MikeDelaCruz77
        MikeDelaCruz77
        0
        3
        346

      • Trailing Slashes In Url use Canonical Url or 301 Redirect?
        RyanKent
        RyanKent
        0
        7
        2.7k

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

      • 301 Redirect from sub domain to new domain
        Thos003
        Thos003
        0
        3
        1.1k

      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