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 do I use only one URL

    How do I use only one URL

    Technical SEO Issues
    7 3 476
    • 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.
    • Weblion
      Weblion last edited by

      my site can be reach by both www.site.com and site.com.  How do I make it only use www?

      1 Reply Last reply Reply Quote 0
      • Matt-Williamson
        Matt-Williamson last edited by

        Setup a 301 redirect (permanent) from site.com to www.site.com. You might find this guide useful - http://www.seomoz.org/learn-seo/redirection

        And this will show you all the different ways of creating a 301 redirect - http://www.webconfs.com/how-to-redirect-a-webpage.php

        Weblion 1 Reply Last reply Reply Quote 2
        • Weblion
          Weblion @Matt-Williamson last edited by

          Thank you so much!  This is what I was looking for.

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

            Matt is right, but you may also want to use a .htaccess solution. Add this or get your devs to add this to your .htaccess file

            <code class="htaccess" title="in your .htaccess file">RewriteEngine On
            RewriteCond %{HTTP_HOST} !^www\.
            RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]</code>
            

            If you use this method plus Matt's then you may find you end up with a redirect loop. I personally use the .htaccess rule, but each to their own.

            Matt-Williamson 1 Reply Last reply Reply Quote 1
            • Matt-Williamson
              Matt-Williamson @MalcolmGibb last edited by

              Glad I could help weblion,

              Malcolm that is a 301 redirect using .htaccess that you have written - the second link on my response shows you the different ways to go about implementing a 301 redirect including your method, which I have personally used on sites.

              Not all web servers are compatible with 301 redirects using .htaccess, so I would definitely look at the different options for which best fits in with your setup.

              MalcolmGibb 1 Reply Last reply Reply Quote 0
              • MalcolmGibb
                MalcolmGibb @Matt-Williamson last edited by

                Yes, sorry did not see the second link, and yes some web servers notably windows iis shared servers are pretty tricky at setting up .htaccess. Both are valid solutions though, just depends on circumstances.

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

                  Thanks so much for the information!

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  • Clean URL vs. Parameter URL and Using Canonical URL...That's a Mouthfull!
                    Roman-Delcarmen
                    Roman-Delcarmen
                    0
                    4
                    170

                  • Hi, we are wanting to test a new version of one particular page on our website. What's the best way to run a test for a week without harming rankings. Do we use a 302 redirect or direct 100% of traffic using a tool like Optimizely?
                    WebElaine
                    WebElaine
                    0
                    2
                    33

                  • 301 redirects - one overall redirect or an individual one for each page url
                    Kurt_Steinbrueck
                    Kurt_Steinbrueck
                    1
                    4
                    160

                  • What are the SEO implications of URLs that use a # in them?
                    irvingw
                    irvingw
                    0
                    5
                    546

                  • Crawl reveals hundreds of urls with multiple urls in the url string
                    irvingw
                    irvingw
                    0
                    5
                    455

                  • Is it ok to just use the end of the url when using a Rel Cononical Link?
                    rhutchings
                    rhutchings
                    0
                    2
                    658

                  • I can see one url and get one url ( after copying) urgent pls!
                    KeriMorgret
                    KeriMorgret
                    0
                    2
                    634

                  • Should Canonical URLs be used in Wordpress?
                    BradBorst
                    BradBorst
                    0
                    3
                    835

                  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