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. We are redirecting http and non www versions of our website. Should all versions http (non www version and www version) and https (non www version) should just have 1 redirect to the https www version?

    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.

    We are redirecting http and non www versions of our website. Should all versions http (non www version and www version) and https (non www version) should just have 1 redirect to the https www version?

    Intermediate & Advanced SEO
    3
    7
    2391
    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.
    • Caffeine_Marketing
      Caffeine_Marketing Subscriber last edited by

      We are redirecting http and non www versions of our website. Should all versions http (non www version and www version) and https (non www version) should just have 1 redirect to the https www version?

      Thant way all forms of the website are pointing to one version?

      1 Reply Last reply Reply Quote 0
      • BlueprintMarketing
        BlueprintMarketing @Caffeine_Marketing last edited by

        I am happy I could be of help please let me know if there's anything else I can be of assistance with?

        1 Reply Last reply Reply Quote 0
        • BlueprintMarketing
          BlueprintMarketing @Caffeine_Marketing last edited by

          PS I will run a crawl to check

          1 Reply Last reply Reply Quote 0
          • BlueprintMarketing
            BlueprintMarketing @Caffeine_Marketing last edited by

            It is fine to 301 redirect to** "/"** you need to pick forward slash "/" or no forward slash.

            • SEE:
            • https://webmasters.googleblog.com/2010/04/to-slash-or-not-to-slash.html
            • https://www.seroundtable.com/google-trailing-slashes-url-24943.html

            You should force HTTPS

            • http://cardiff.co.uk 301's to http://www.cardiff.co.uk/
            • See: https://i.imgur.com/fg34sXR.png
            • You should add https
            • https://dash.cloudflare.com/sign-up
            • or
            • https://www.rapidtables.com/web/tools/redirect-generator.html

            Add a SSL cert I would just add cloudflare.com (if you want fast & easy also Free)

            • https://support.cloudflare.com/hc/en-us/articles/204144518
            • https://support.cloudflare.com/hc/en-us/articles/200172286-Configuring-URL-forwarding-or-redirects-with-Cloudflare-Page-Rules

            When configuring Page Rules, the Always use HTTPS action is the simplest method to redirect HTTP requests to HTTPS.  You can also use the Forwarding URL action with a 301 redirect if you need to redirect to another subdomain in addition to forcing HTTPS. For example, a Page Rule match for

            **_http://_cardiff.co.uk_/*_**
            

            with a _Forwarding URL _of

            **_https://www.cardiff.co.uk/$1_**
            

            https://www.cardiff.co.uk/

            ASP.NET

            or ASP.NET

            <%@ Language="VBScript" %>
            <%
            ' ASP permanent URL redirect - generated by www.rapidtables.com
            Response.Status="301 Moved Permanently"
            Response.AddHeader "Location", "https://www.cardiff.co.uk/"
            Response.End
            %>

            Redirect entire domain from HTTP to HTTPS

            RewriteEngine On
            RewriteCond %{HTTPS} off
            RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
            

            Redirect entire domain from non-www to www and HTTP to HTTPS

            RewriteEngine On
            RewriteCond %{HTTP_HOST} !^www\. [NC]
            RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
            RewriteCond %{HTTP:X-Forwarded-Proto} !https
            RewriteCond %{HTTPS} off
            RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
            

            Hope this helps,

            Tom

            fg34sXR.png

            1 Reply Last reply Reply Quote 0
            • Caffeine_Marketing
              Caffeine_Marketing Subscriber last edited by

              Thank you for the advice it is very useful.

              In GWT we are also showing redirects on all pages from the non / page to the / page

              ie cardiff.co.uk redirects to  cardiff.co.uk/

              is this OK?

              BlueprintMarketing 3 Replies Last reply Reply Quote 0
              • BlueprintMarketing
                BlueprintMarketing last edited by

                if you talking about the domain

                you should 301 redirect each of the 3 of 4 different URLs to the one you want to be the primary domain that is using https

                This is a great guide

                https://ahrefs.com/blog/301-redirects/

                You can always use CloudFlare as free & easy fix.

                If you want to use HSTS preload or just HSTS

                Test your 301 setup using

                https://hstspreload.org/?domain=example.com

                If you are using https://www.  as the primary

                See you must force http to https and the HTTP://www

                Must redirect to the https:// bare domain so that means two redirects.

                Error: No redirect from HTTPhttp://example.com does not redirect to https://example.com.

                Hope this helps,

                Tom

                1 Reply Last reply Reply Quote 0
                • Xiano
                  Xiano Subscriber last edited by

                  Ideally, yes.

                  However, it's not likely to have a massive impact if you do have a redirect chain first to www and then to https.

                  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

                  • Daaveey

                    Should I redirect a domain we control but which has been labeled 'toxic' or just shut it down?

                    Hi Mozzers: We recently launched a site for a client which involved bringing in and redirecting content which formerly had been hosted on different domains. One of these domains still existed and we have yet to bring over the content from it. It has also been flagged as a suspicious/toxic backlink source to our new domain. Would I be wise to redirect this old domain or should I just shut it down? None of the pages seem to have particular equity as link sources. Part of me is asking myself 'Why would we redirect a domain deemed toxic, why not just shut it down.' Thanks in advance, dave

                    Intermediate & Advanced SEO | | Daaveey
                    0
                  • Easigrass

                    Help with force redirect HTTP to HTTPS

                    Hi, I'm unsure of where I should be putting the following code for one of my Wordpress websites so that they redirect all HTTP requests to HTTPS. RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] This is my current htaccess file: *missing

                    Intermediate & Advanced SEO | | Easigrass
                    0
                  • dsbud

                    301 redirect hops from non-https and www

                    It's best practice to minimize the amount of 301 redirect hops. Ideally only one redirect hop. It's also best practice to 301 redirect (or at least canonical) your non-https and/or your non-www (or www) to the canonical protocol/subdomain. The simplest (and possibly the most common) way to implement canonical protocol/subdomain redirects is through a load balancer or before your app processes the request. Both of which will just blanket 301 to the canonical domain/protocol regardless if the path exists or not In which case, you could have: Two hops. i.e. hop #1 http://example.com/foo to https://example.com/foo, hop #2 https://example.com/foo to https://example.com/bar 301 to a 404. Let's say https://example.com/dog never existed, but somebody for whatever reason linked to it (maybe a typo). If I request https://www.example.com/dog, the load balancer would 301 to a 404 page. Either scenario above should be fairly rare. However, you can't control how people link to you. Should I care about either above scenario? I could have my app attempt to check if the page exists before forwarding, but that code could be complicated.

                    Intermediate & Advanced SEO | | dsbud
                    0
                  • admiral99

                    Should I use https schema markup after http-https migration?

                    Dear Moz community, Noticed that several groups of websites after HTTP -> HTTPS migration update their schema markup from, example : {
                    "@context": "http://schema.org",
                    "@type": "WebSite",
                    "name": "Your WebSite Name",
                    "alternateName": "An alternative name for your WebSite",
                    "url": "http://www.your-site.com"
                    } becomes {
                    "@context": "https://schema.org",
                    "@type": "WebSite",
                    "name": "Your WebSite Name",
                    "alternateName": "An alternative name for your WebSite",
                    "url": "https://www.example.com"
                    } Interesting to know, because Moz website is on https protocol but uses http version of markup. Looking forward for answers 🙂

                    Intermediate & Advanced SEO | | admiral99
                    0
                  • CommT

                    Should I redirect my xml sitemap?

                    Hi Mozzers, We have recently rebranded with a new company name, and of course this necessitated us to relaunch our entire website onto a new domain. I watched the Moz video on how they changed domain, copying what they did pretty much to the letter. (Thank you, Moz for sharing this with the community!) It has gone incredibly smoothly. I told all my bosses that we may see a 40% reduction in traffic / conversions in the short term. In the event (and its still very early days) we have in fact seen a 15% increase in traffic and our new website is converting better than before so an all-round success! I was just wondering if you thought I should redirect my XML sitemap as well? So far I haven't, but despite us doing the change of address thing in webmaster tools, I can see Google processed the old sitemap xml after we did the change of address etc. What do you think? I know we've been very lucky with the outcome of this rebrand but I don't want to rest on my laurels or get tripped up later down the line. Thanks everyone! Amelia

                    Intermediate & Advanced SEO | | CommT
                    0
                  • SMG-Texas

                    301 Redirect of subdomain?

                    Fellow Mozzers, I'm having a hard time wrapping my brain around a redirect issue and thought it was worth posing the question to the Moz community.  I did a search first but couldn't find the exact answer I was looking for. How does a 301 redirect work when you redirect a sub domain example.homepage.com to www.homepage.com but you keep the sub directories of example.homepage.com/page-1 active and are trying to rank them?  I'm dealing with a current project where this is happening and this doesn't make sense to me, to redirect the subdomain if you're also trying to rank/create search traffic for pages, sub directories on example.homepage.com. This also get's into the debate of if a sub domain site is viewed as it's own website and therefore has to rank itself.  If this is true, it seems like we're kind of killing the authority of the site by redirecting it. Additionally, www.homepage.com has a much stronger link profile than example.homepage.com I hope this makes sense.  Any thoughts are appreciated.  Thanks for your time.

                    Intermediate & Advanced SEO | | SMG-Texas
                    0
                  • Townpages

                    .htaccess 301 Redirect Help! Specific Redirects and Blanket Rule

                    Hi there, I have the following domains: OLD DOMAIN: domain1.co.uk NEW DOMAIN: domain2.co.uk I need to create a .htaccess file that 301 redirects specific, individual pages on domain1.co.uk to domain2.co.uk I've searched for hours to try and find a solution, but I can't find anything that will do what I need. The pages on domain1.co.uk are all kinds of filenames and extensions, but they will be redirected to a Wordpress website that has a clean folder structure. Some example URL's to be redirected from the old website: http://www.domain1.co.uk/charitypage.php?charity=357 http://www.domain1.co.uk/adopt.php http://www.domain1.co.uk/register/?type=2 These will need to be redirected to the following URL types on the new domain: http://www.domain2.co.uk/charities/ http://www.domain2.co.uk/adopt/ http://www.domain2.co.uk/register/ I would also like a blanket/catch-all redirect from anything else on www.domain1.co.uk to the homepage of www.domain2.co.uk if there isn't a specific individual redirect in place. I'm literally tearing my hair out with this, so any help would be greatly appreciated! Thanks

                    Intermediate & Advanced SEO | | Townpages
                    0
                  • VTDesignWorks

                    Old Redirecting Website Still Showing In SERPs

                    I have a client, a plumber, who bought another plumbing company (and that company's domain) at one point. This other company was very old and has a lot of name recognition so they created a dedicated page to this other company within their main website, and redirected the other company's old domain to that page. This has worked fine, in that this page on the main site is now #1 when you search for the other old company's name. But for some reason the old domain comes up #2 (despite the fact that it's redirecting). Now, I could understand if the redirect had only been set up recently, but I'm reasonably sure this happened about a year ago. Could it be due to the fact that there are many sites out there still linking to that old domain? Thanks in advance!

                    Intermediate & Advanced SEO | | VTDesignWorks
                    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.