Skip to content
    Moz logo Menu open Menu close
    • Products
      • Moz Pro
      • Moz Pro Home
      • Moz Local
      • Moz Local Home
      • STAT
      • Moz API
      • Moz API Home
      • Compare SEO Products
      • Moz Data
    • Free SEO Tools
      • Domain Analysis
      • Keyword Explorer
      • Link Explorer
      • Competitive Research
      • MozBar
      • More Free SEO Tools
    • Learn SEO
      • Beginner's Guide to SEO
      • SEO Learning Center
      • Moz Academy
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • The Moz Story
      • New Releases
    • Log in
    • Log out
    • Products
      • Moz Pro

        Your all-in-one suite of SEO essentials.

      • Moz Local

        Raise your local SEO visibility with complete local SEO management.

      • STAT

        SERP tracking and analytics for enterprise SEO experts.

      • Moz API

        Power your SEO with our index of over 44 trillion links.

      • Compare SEO Products

        See which Moz SEO solution best meets your business needs.

      • Moz Data

        Power your SEO strategy & AI models with custom data solutions.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Free SEO Tools
      • Domain Analysis

        Get top competitive SEO metrics like DA, top pages and more.

      • Keyword Explorer

        Find traffic-driving keywords with our 1.25 billion+ keyword index.

      • Link Explorer

        Explore over 40 trillion links for powerful backlink data.

      • Competitive Research

        Uncover valuable insights on your organic search competitors.

      • MozBar

        See top SEO metrics for free as you browse the web.

      • More Free SEO Tools

        Explore all the free SEO tools Moz has to offer.

      What is your Brand Authority?
      Moz

      What is your Brand Authority?

      Check yours now
    • Learn SEO
      • Beginner's Guide to SEO

        The #1 most popular introduction to SEO, trusted by millions.

      • SEO Learning Center

        Broaden your knowledge with SEO resources for all skill levels.

      • On-Demand Webinars

        Learn modern SEO best practices from industry experts.

      • How-To Guides

        Step-by-step guides to search success from the authority on SEO.

      • Moz Academy

        Upskill and get certified with on-demand courses & certifications.

      • SEO Q&A

        Insights & discussions from an SEO community of 500,000+.

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Small Business Solutions

        Uncover insights to make smarter marketing decisions in less time.

      • Agency Solutions

        Earn & keep valuable clients with unparalleled data & insights.

      • Enterprise Solutions

        Gain a competitive edge in the ever-changing world of search.

      • The Moz Story

        Moz was the first & remains the most trusted SEO company.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • New Releases

        Get the scoop on the latest and greatest from Moz.

      Surface actionable competitive intel
      New Feature

      Surface actionable competitive intel

      Learn More
    • Log in
      • Moz Pro
      • Moz Local
      • Moz Local Dashboard
      • Moz API
      • Moz API Dashboard
      • Moz Academy
    • Avatar
      • Moz Home
      • Notifications
      • Account & Billing
      • Manage Users
      • Community Profile
      • My Q&A
      • My Videos
      • Log Out

    The Moz Q&A Forum

    • Forum
    • Questions
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

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

    1. Home
    2. SEO Tactics
    3. Intermediate & Advanced SEO
    4. 301 redirect with /? in URL

    Moz Q&A is closed.

    After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

    301 redirect with /? in URL

    Intermediate & Advanced SEO
    4
    5
    2077
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with question management privileges can see it.
    • COEDMediaGroup
      COEDMediaGroup last edited by

      For a Wordpress site that has the ending / in the URL with a ? after it... how can you do a 301 redirect to strip off anything after the /

      For example how to take this URL

      domain.com/article-name/?utm_source=feedburner

      and 301 to this URL

      domain.com/article-name/

      Thank you for the help

      1 Reply Last reply Reply Quote 0
      • Aleyda
        Aleyda @COEDMediaGroup last edited by

        Hi Robert,

        The rewrite rules shared by Patrick should work well for that although you could also use Yoast's Wordpress SEO plugin that features options to do that through the control panel.

        Nonetheless, in general what can be better in performance and also for tracking purposes with your site URL, leaving tracking parameters while avoiding content duplication content is to use canonical tags. You can also set them easily for Wordpress with Yoast's plugin.

        I hope this helps!

        Aleyda

        1 Reply Last reply Reply Quote 2
        • AmberRobinson
          AmberRobinson last edited by

          Have you tried the Redirection tool when you login to the back-end of the site?

          1 Reply Last reply Reply Quote 0
          • COEDMediaGroup
            COEDMediaGroup last edited by

            Just looking to remove it. Thanks for the info, will see if this works.

            Aleyda 1 Reply Last reply Reply Quote 0
            • StreamlineMetrics
              StreamlineMetrics last edited by

              Do you want to capture the parameter value or do you want to just remove it immediately? If you want to remove it without worrying about capturing the value in Google Analytics, then this code may work -

              RewriteEngine On
              RewriteCond %{QUERY_STRING} !="" #if there is a query string
              RewriteCond %{QUERY_STRING} !^p=.* #wordpress users: allow post tempalinks
              RewriteCond %{REQUEST_URI} !^/wp-admin.* #wordpress users: don't break admin
              RewriteRule ^(.*)$ /$1? [R=301,L] #remove query string

              I got this code from http://briancray.com/posts/htaccess-hack-remove-url-query-strings/

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post

              Got a burning SEO question?

              Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


              Start my free trial


              Browse Questions

              Explore more categories

              • Moz Tools

                Chat with the community about the Moz tools.

              • SEO Tactics

                Discuss the SEO process with fellow marketers

              • Community

                Discuss industry events, jobs, and news!

              • Digital Marketing

                Chat about tactics outside of SEO

              • Research & Trends

                Dive into research and trends in the search industry.

              • Support

                Connect on product support and feature requests.

              • See all categories

              Related Questions

              • vtmoz

                Does removal of internal redirects(301) help in SEO

                I am planning to completely remove 301 redirects manually by replacing such links with actual live pages/links. So there will be no redirects internally in the website. Will this boost our SEO efforts? Auto redirects will be there for incoming links to non-existing pages. Thanks, Satish

                Intermediate & Advanced SEO | | vtmoz
                0
              • alecfwilson

                For URLs that require login, should our redirect be 301 or 302?

                We have a login required section of our website that is being crawled and reporting as potential issues in Webmaster Tools. I'm not sure what the best solution to this is - is it to make URLs requiring a login noindex/nocrawl? Right now, we have them 302 redirecting to the login page, since it's a temporary redirect, it seems like it isn't the right solution. Is a 301 better?

                Intermediate & Advanced SEO | | alecfwilson
                0
              • Travis-W

                Ending URLs in .html versus /

                Hi there! Currently all the URLs on my website, even the home page, end it .html, such as http://www,consumerbase.com/index.html Is this bad?
                Is there any benefit to this? Should I remove it and just have them end with a forward slash?
                If I 301 redirect the old .html URLs to the forward slash URLs, will I lose PA? Thanks!

                Intermediate & Advanced SEO | | Travis-W
                0
              • Modi

                Is 301 redirect suggested on pagination pages

                Hi - Due to pagination the default page of site is coming in 2 url with - ?page=1/ sub-url and /sub-url is 301 a recommended solution due to this pagination urls Also - is it required to create separate title and meta description of every pagination page We are taking specifically in context of our discounts and offer section http://www.mycarhelpline.com/index.php?option=com_offers&view=list&Itemid=9

                Intermediate & Advanced SEO | | Modi
                0
              • Prime85

                301 Redirect - What happens to backlinks

                Hello... One of my sites is losing rankings in G. I received the webmaster notification of unnatural links... My question is, should i do a 301 redirect of every page on my site to a new domain? If so, do the backlinks (which i believe are causing my rankings to drop) carry over? How about the good backlinks? Also, what would happen to the rankings i currently have on page 1? Thanks

                Intermediate & Advanced SEO | | Prime85
                0
              • Visually

                Are there any negative effects to using a 301 redirect from a page to another internal page?

                For example, from http://www.dog.com/toys to http://www.dog.com/chew-toys. In my situation, the main purpose of the 301 redirect is to replace the page with a new internal page that has a better optimized URL. This will be executed across multiple pages (about 20). None of these pages hold any search rankings but do carry a decent amount of page authority.

                Intermediate & Advanced SEO | | Visually
                0
              • brianmcc

                Reverse Proxy better than 301 redirect?

                Are reverse proxies that much better than 301 redirects? Should I invest the time in doing this? I found out about reverse proxies here: http://www.seomoz.org/blog/what-is-a-reverse-proxy-and-how-can-it-help-my-seo

                Intermediate & Advanced SEO | | brianmcc
                0
              • AndreVanKets

                Is it safe to redirect multiple URLs to a single URL?

                Hi, I have an old Wordress website with about 300-400 original pages of content on it. All relating to my company's industry: travel in Africa. It's a legitimate site with travel stories, photos, advice etc. Nothing spammy about. No adverts on it. No affiliates. The site hasn't been updated for a couple of years and we no longer have a need for it. Many of the stories on it are quite out of date. The site has built up a modest Mozrank value over the last 5 years, and has a few hundreds organically achieved inbound links. Recently I set up a swanky new branded website on ExpressionEngine on a new domain. My intention is to: Shut down the old site Focus all attention on building up content on the new website Ask the people linking to the old site to my new site instead (I wonder how many will actually do so...) Where possible, setup a 301 redirect from pages on the old site to their closest match on the new site Setup a 301 redirect from the old site's home page to new site's homepage Sounds good, right? But there is one issue I need some advice on... The old site has about 100 pages that do not have a good match on the new site. These pages are outdated or inferior quality, so it doesn't really make sense to rewrite them and put them on the new site. I call these my "black sheep pages". So... for these "black sheep pages" should I (A) redirect the urls to the new site's homepage (B) redirect the urls the old site's home page (which in turn, redirects to the new site's homepage, or (C) not redirect the urls, and let them die a lonely 404 death? OPTION A: oldsite.com/page1.php -> newsite.com
                oldsite.com/page2.php -> newsite.com
                oldsite.com/page3.php -> newsite.com
                oldsite.com/page4.php -> newsite.com
                oldsite.com/page5.php -> newsite.com
                oldsite.com -> newsite.com OPTION B: oldsite.com/page1.php -> oldsite.com
                oldsite.com/page2.php -> oldsite.com
                oldsite.com/page3.php -> oldsite.com
                oldsite.com/page4.php -> oldsite.com
                oldsite.com/page5.php -> oldsite.com
                oldsite.com -> newsite.com OPTION 😄 oldsite.com/page1.php : do not redirect, let page 404 and disappear forever
                oldsite.com/page2.php : do not redirect, let page 404 and disappear forever
                oldsite.com/page3.php : do not redirect, let page 404 and disappear forever
                oldsite.com/page4.php : do not redirect, let page 404 and disappear forever
                oldsite.com/page5.php : do not redirect, let page 404 and disappear forever
                oldsite.com -> newsite.com My intuition tells me that Option A would pass the most "link juice" to my new site, but I am concerned that it could also be seen by Google as a spammy redirect technique. What would you do? Help 😐

                Intermediate & Advanced SEO | | AndreVanKets
                1

              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
              Free SEO Tools
              • Domain Authority Checker
              • Link Explorer
              • Keyword Explorer
              • Competitive Research
              • Brand Authority 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 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
              • Accessibility
              • Terms of Use
              • Privacy

              Looks like your connection to Moz was lost, please wait while we try to reconnect.