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. Intermediate & Advanced SEO
    4. Www and non www how to check it.......for sure. No, really, for absolutely sure!!

    Www and non www how to check it.......for sure. No, really, for absolutely sure!!

    Intermediate & Advanced SEO
    25 5 7.4k
    • 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.
    • RobertFisher
      RobertFisher @RyanKent last edited by

      Unfortunately, the other developer controls all. We develop a set of sites that are essentially micro sites that advertise particular facets of our clients professional practice. With our sites when we have the main site and the micro sites, we make the 301 change in the .htaccess and then set the preference with Google per webmaster tools. We look first to see where the page authority lies and redirect from weak to strong if just for www/non www. With a new TLD, obviously, it is from old to new.

      I want a sure way to know this ...person....did what they are telling their client they did. It does not appear so. With ours when we do a site:OurSite we get what we assumed on every page of Google search. With this one it is four pages with the 13 www and 20 non www. Some www urls resolve to the non and some do not. When I look in OSE, I see where there is mention of a redirect from www to non www, and the non www all with PA of 1, DA of 15. With www, PA is 25 for home page.

      Is my assumption that if a 301 was done in .htaccess, there should be no www showing in Google Site:?

      Thanks

      RyanKent RobertFisher 2 Replies Last reply Reply Quote 0
      • AlanMosley
        AlanMosley @RobertFisher last edited by

        just a point, you dont need to do a 301 in the .htaccess file.

        I work with Microsoft Technolgies, and we dont use them, .htacces is a linux appache thing

        1 Reply Last reply Reply Quote 0
        • AlanMosley
          AlanMosley @ShaMenz last edited by

          Sha, what does PM stand for? Am I missing somthing?

          RyanKent AlanMosley RobertFisher 3 Replies Last reply Reply Quote 0
          • RyanKent
            RyanKent @AlanMosley last edited by

            Well if Robert Private Messages Sha, then you would be missing that message 🙂

            1 Reply Last reply Reply Quote 0
            • AlanMosley
              AlanMosley @AlanMosley last edited by

              Private Message Ok, should of been obvious

              1 Reply Last reply Reply Quote 0
              • RobertFisher
                RobertFisher @RobertFisher last edited by

                We are linux on all though. So the .htaccess file is the bomb with a 301 and we follow up with setting preference in Google webmaster tools.

                1 Reply Last reply Reply Quote 0
                • RobertFisher
                  RobertFisher @RyanKent last edited by

                  I shot you a PM. Just dont want the other guys info out. If it was my site and I had full control would tell all. Sha got one too. Thanks

                  1 Reply Last reply Reply Quote 0
                  • RobertFisher
                    RobertFisher @RyanKent last edited by

                    I shot you a PM. Just dont want the other guys info out. If it was my site and I had full control would tell all. Sha got one too. Thanks

                    1 Reply Last reply Reply Quote 0
                    • AlanMosley
                      AlanMosley @RobertFisher last edited by

                      If you want Robert, if you PM me the url, i will give you a site wide check

                      1 Reply Last reply Reply Quote 0
                      • RyanKent
                        RyanKent @RobertFisher last edited by

                        I want a sure way to know this ...person....did what they are telling their client they did.

                        Perhaps someone has more creativity then myself but I do not know any means by which you can be 100% certain a sitewide 301 is implemented without seeing the file on the server. The "file" varies based on the server type. As you know, for Apache servers the .htaccess file is the right one.

                        Even if you saw the .htaccess file, it is possible for another file to overwrite the command. The way I always have verified is by looking at the site itself. Check the home page and a few other pages. If they are all 301'd properly, then I presume the developer performed their job correctly. It would actually be a lot more work for the developer to attempt to fool you by 301'ing part of the site but not all.

                        I also suggest ensuring your site's www or non-www standard appears correctly in your crawl report.

                        Is my assumption that if a 301 was done in .htaccess, there should be no www showing in Google Site:?

                        That is not necessarily true. If you have a site which shows mixed URL results, then overtime the results from a site: search will be standardized, but it will take time as Google needs to crawl each and every page of the site and see the 301. Also if any page is blocked by robots.txt for example, then Google may not see the 301 for that page and still list the old url.

                        If you changed the Google WMT preferred domain setting, then it is true you will only see one version of the URL. I would specifically advise you NOT to change that setting in this case as it may cover up the developer's issue which you are trying to locate. As for now, you can wait 30 days and perform a site: search. Investigate any bad URLs you find.

                        1 Reply Last reply Reply Quote 3
                        • RobertFisher
                          RobertFisher @AlanMosley last edited by

                          Thanks for this Alan, I use Linux / Apache but having the IE info is a big help. Usually have Chrome or Firefox up, but some real estate sites here only use IE.

                          AlanMosley 1 Reply Last reply Reply Quote 0
                          • AlanMosley
                            AlanMosley @RobertFisher last edited by

                            This info is really not browser dependent, just displayed differently.

                            But as i stated elswhere, if you PM me the Url i can give you a site wide report that will show you any cononical problems, or any problems for that matter.

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

                              OK Robert,

                              First I'm going to tip my hat to Ryan, who has perfectly explained the fact that some of what you see in your site: search can be because the 301's have not yet been recognized by the search engine.

                              Second, an apology to Alan as I went right to the LAMP solution because of prior knowledge from a previous thread or two 😉 that you were going to be talking about .htaccess 🙂

                              Now...I will spell out a couple of things because I have a feeling that you are likely to come across them again in the future and quick recognition can often mean a lot of time saved.

                              So here goes.

                              When I first read your question, my little web developer antennae suddenly started twitching! When I hear that there are multiple versions of a file with different file names deployed on a server I generally suspect one of two things:

                              • The site has been developed from a standard Template package, or
                              • There has just been a little "untidiness" taking place in the development process.

                              In your example, the /contact.php was the original file deployed live to the server, then the /contact-us.php file was created to replace it (presumably for SEO purposes - debatable, but that is a whole other conversation). As I'm sure you can imagine, /contact is pretty common in template packages, although the biggest template producer out there is much easier to spot, as the pages in their templates are always in the format /index-1.htm etc. It may just be that the developer creates their own standard template from an original design and rather than pre-planning and creating the file names to maximize SEO, they create standard page names and change them later.

                              While there is nothing really wrong with either of these things (unless you are charging the client for an original design and buying a pre-designed template at a fraction of the cost), both methods do open up the way for mistakes and errors to occur. As a result, there are a few things to keep in mind if you are working this way -

                              1. It is a much better idea to build on a development server so that none of the files that will become obsolete during the process will be indexed by search engines in the meantime. Tidy architecture, remove the obsolete files, test, then push to production.
                              2. When changing file names it is ALWAYS better to re-name the existing file and do a global update of links rather than create a duplicate with a different name. As soon as you create two files, you open up the possibility of accidentally linking both files within the site. You could have /contact.php linked from the home page and contact-us.php linked from the footer for example. There is a danger here that should you decide to delete the unwanted file, you create broken links without knowing it, or you have duplicate content. Either way, you have to recognize the problem and either fix it, or put a 301 in place to catch it.
                              3. NEVER hard code your links, because as soon as you change the name of the directory you placed your files in, you create a broken link! If you use relative links, the change of directory name will not matter.

                              I can see from Screaming Frog that some of the URL's for the pdf files have 301's in place, but it appears that the Redirect URL may also be hard coded to the /pdfs directory.  The fact that they all return a 404 when the directory name is changed to match that section makes it purely a guess as to what is happening here. It seems both www and non www pdf's are returning 404's in the browser.

                              The picture is muddied a little by the fact that there appear to be internal URL rewrites in the mix as well (to produce those pretty URL's with trailing slashes). So, there are a few options as to why the pdf's are not accessible:

                              1. They are not actually on the server at all (unlikely)
                              2. The names of the pdf's themselves have been changed, so even if the URL rewrite is sending the request to the new directory, the file requested does not exist.
                              3. The /pdfs directory has been named something completely different and the hard coding is the problem
                              4. The /pdfs directory has been moved to another location within the site architecture

                              I tried guessing a couple dozen of the obvious options, but no luck I'm afraid 🙂

                              There is one other possibility, in that the internal URL rewrites and 301 redirects could be creating a problem for each other. I am not clever enough to identify whether this is the case without a hint from the code, but will ask the God of All Things Code (my Boss) if he can answer that for me when daytime arrives 8D

                              OK....this is now so long that I really need to read the whole thread back to see if I have forgotten anything! If I find something I have missed, or can find anything else when help arrives, I'll be back!

                              Hope it makes some sort of sense and ultimately helps,

                              Sha

                              1 Reply Last reply Reply Quote 3
                              • RobertFisher
                                RobertFisher @AlanMosley last edited by

                                OK Ryan, you don't sleep and that was funny ;).

                                1 Reply Last reply Reply Quote 0
                                • RobertFisher
                                  RobertFisher @RobertFisher last edited by

                                  Well done, good point on pref setting in WMT. Thanks,

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

                                    Hi again Robert,

                                    God of All Things Code is away from the office for a while today, so will need to wait a little longer for his input.

                                    A couple of things that happened since my last post though:

                                    Those twitching antennae just wouldn't stop nudging me to look a little further as everything I see with this site is saying "template" to me. Add to that the URL rewrites which hide the actual URL's and the broken pdf files...so i went digging a little further and ... Aha!

                                    Not a template, but a "Theme". The entire site is built in Wordpress!

                                    Now, I am pretty sure that the broken pdf's are the result of the Wordpress URL rewrites changing the directory name in combination with the hard coded links. If this is the case, then it ought to be just a matter of adding a rule to the .htaccess file to deal specifically with the pdf's. The order in which the rules appear will determine whether the issue is resolved or not.

                                    I'll let you know as soon as I've confirmed the specifics with my Boss.

                                    Hope that helps,

                                    Sha

                                    1 Reply Last reply Reply Quote 0
                                    • 1
                                    • 2
                                    • 1 / 2
                                    • First post
                                      Last post
                                    • 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?
                                      BlueprintMarketing
                                      BlueprintMarketing
                                      0
                                      8
                                      437

                                    • Www vs Non-www version - should we still redirect?
                                      Martijn_Scheijbeler
                                      Martijn_Scheijbeler
                                      0
                                      2
                                      71

                                    • Disavow both www. and non www. version of site?
                                      seomozinator
                                      seomozinator
                                      0
                                      2
                                      394

                                    • Switching site from non-www to www
                                      MonicaOConnor
                                      MonicaOConnor
                                      0
                                      7
                                      3.7k

                                    • Www for main site and non www for integrated blog - is this a problem?
                                      Christy-Correll
                                      Christy-Correll
                                      0
                                      5
                                      116

                                    • Www vs. non-www differences in crawl errors in Webmaster tools...
                                      TakeshiYoung
                                      TakeshiYoung
                                      0
                                      4
                                      339

                                    • Www or no www
                                      TakeshiYoung
                                      TakeshiYoung
                                      0
                                      5
                                      531

                                    • Www. & Non-www versions problem
                                      SanketPatel
                                      SanketPatel
                                      0
                                      5
                                      201

                                    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