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. Web Design
    4. Missing trailing slash in URL on subpages resulting in Moz PA of 1

    Missing trailing slash in URL on subpages resulting in Moz PA of 1

    Web Design
    19 2 1.5k
    • 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.
    • BlueprintMarketing
      BlueprintMarketing @serverleap last edited by

      Look at this http://cl.ly/faXF

      https://moz.com/researchtools/ose/comparisons?site=https%3A%2F%2Fwww.ultrawebhosting.com%2Fdedicated-servers

      compare with

      https://moz.com/researchtools/ose/comparisons?site=https%3A%2F%2Fwww.ultrawebhosting.com%2Fhosting-dedicated.php

      It is still showing up with .php

      https://www.ultrawebhosting.com/hosting-dedicated.php needs to 301 to

      https://www.ultrawebhosting.com/dedicated-servers/

      Its the .php &  different link that has back links to it that is not properly pointing to it. Check

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

        Try //Rewrite to www

        Options +FollowSymLinks

        RewriteEngine on

        RewriteCond %{HTTP_HOST} ^ultrawebhosting.com[nc]

        RewriteRule ^(.*)$ http://www.ultrawebhosting.com/$1 [r=301,nc]

        //301 Redirect Old File

        Redirect 301 .php /

        See http://www.askapache.info//2.3/mod/mod_alias.html#redirectmatch

        Sorry for all the duplicate stuff everything posts that way is annoying sorry about that. Nevertheless, you have to remove the PHP from your site. And redirect it correctly.

        Let me know if that helps,

        See below

        |

        Purpose

        |

        Example formatting

        Include an entire directory but nothing beneath it

        |

        http://www.yourdomain.com/shop/

        ^/shop/?$

        Include all subdirectories

        |

        http://www.yourdomain.com/shop/*

        ^/shop/.*

        Include a single file

        |

        http://www.yourdomain.com/shop.php

        ^/shop.php

        Include any file of a specific type

        |

        ^/shop/.*.php – any php file

        |

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

          Hello Thomas,

          Thank you for your time.

          Redirect 301 /hosting-dedicated.php https://www.ultrawebhosting.com/dedicated-servers

          has been set since 01/02/16 via .htaccess

          I have removed the duplicate access-control as one was arbitrating font extensions and the other everything.

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

            Was not able to fix the problem? If not you may want to force a / with a /?$  that way it will only be forced if needed.

            Hope that helps, Tom

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

              The original question is if it is a factor for the trialing slash to not exist as I am seeing Moz PRs of 1 on these pages after four months.

              I appreciate all the rewrites but this is all common knowledge to me.

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

                It's because there are back links pointing to the URLs that you redirected to dedicated servers for instance. The others have no back links therefore they do not have any page rank.

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

                  The 301 redirect has existed for 4 months and a day. Why has it not assumed PR with Moz?

                  BlueprintMarketing 2 Replies Last reply Reply Quote 0
                  • BlueprintMarketing
                    BlueprintMarketing @serverleap last edited by

                    The 301 has to point to the / it shows PA

                    I'm about to grab dinner when I get back I will do it deep crawl your site and I'll find out the problem for you because it's definitely not a hard issue to figure out and I will dedicate some time to find out.

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

                      I did not show what the PA was when I dropped the /

                      its 0 but when I add it is PA 28 see & try it.

                      Video of what I'm saying http://cl.ly/faXF

                      1 Reply Last reply Reply Quote 1
                      • BlueprintMarketing
                        BlueprintMarketing last edited by

                        Found it your non-https .php URL has backlinks & you are 301  redirecting it to the "/" URL.

                        After that redirects to the non-/. Thus creating a redirect chain

                        You need to redirect the non-HTTPS version of the site/URL  to the non-/ version of the site.  This will give you the domain and page authority that you are missing.

                        I confirmed the back links using majestic.com

                        Result

                        http://www.ultrawebsitehosting.com/hosting-dedicated.php backlinks 
                        301 Moved Permanently
                        https://www.ultrawebhosting.com/dedicated-servers/
                        301 Moved Permanently
                        https://www.ultrawebhosting.com/dedicated-servers lost PA when redirected so many times. 
                        200 OK

                        HTTP Headers

                        http://www.ultrawebsitehosting.com/hosting-dedicated.php


                        301 Moved Permanently

                        | Status: | 301 Moved Permanently |
                        | Code: | 301 |
                        | Server: | UltraSpeed Hosting by UltraWebHosting.com |
                        | Date: | Sun, 03 Apr 2016 23:42:41 GMT |
                        | Content-Type: | text/html; charset=iso-8859-1 |
                        | Content-Length: | 258 |
                        | Connection: | close |
                        | Location: | https://www.ultrawebhosting.com/dedicated-servers/ |

                        https://www.ultrawebhosting.com/dedicated-servers/


                        301 Moved Permanently

                        | Status: | 301 Moved Permanently |
                        | Code: | 301 |
                        | Server: | UltraSpeed Hosting by UltraWebHosting.com |
                        | Date: | Sun, 03 Apr 2016 23:42:47 GMT |
                        | Content-Type: | text/html; charset=iso-8859-1 |
                        | Content-Length: | 257 |
                        | Connection: | close |
                        | Location: | https://www.ultrawebhosting.com/dedicated-servers |
                        | X-Cache: | HIT from Backend |

                        https://www.ultrawebhosting.com/dedicated-servers


                        200 OK

                        | Status: | 200 OK |
                        | Code: | 200 |
                        | Server: | UltraSpeed Hosting by UltraWebHosting.com |
                        | Date: | Sun, 03 Apr 2016 23:42:48 GMT |
                        | Content-Type: | text/html |
                        | Content-Length: | 40741 |
                        | Connection: | close |
                        | Vary: | Accept-Encoding |
                        | Last-Modified: | Fri, 01 Apr 2016 02:03:57 GMT |
                        | Access-Control-Allow-Origin: | * |
                        | X-Cache: | HIT from Backend |
                        | Accept-Ranges: | bytes |

                        Features

                        This Redirect Checker supports several features like:

                        • · Select different User Agents like
                             · Desktop-Browsers (Chrome, Internet Explorer, Safari, Firefox,...)
                             · Mobile Devices (IPad, Iphone, Android, Windows Phone, Kindle, Nokia...
                             · Search Engine Bots (GoogleBot, Google Mobile Bot, Yandex, BingBot, Baidu, Yahoo Slurp, Naver,...
                        • · checking 302 and 301 redirects
                        • · supports & checks https redirects
                        • · checks meta refresh redirects
                        • · analysis of common javascript redirects
                        • · check and show redirect chains
                        • · check http headers like Status Code, X-Robots-Tag, Rel Canonical Header Tag "Link:"
                        1 Reply Last reply Reply Quote 1
                        • serverleap
                          serverleap last edited by

                          Brilliant!

                          Thank you so much Thomas!!! I will see what I can do about cleaning this all up!

                          I believe I have located it the issue. The redirects are occurring after a base rewrite rule:

                          Rewrite URLs to / from .html. SEO friendly. Added by David Turner 12/26/15

                          RewriteBase /

                          Rewrite requests for index.php to directory to avoid 500 errors when added to paths. Added by David Turner 12/30/15

                          RewriteCond %{THE_REQUEST} ^./index.php
                          RewriteRule ^(.
                          )index.php$ /$1 [R=301,L]

                          remove the .html extension

                          RewriteCond %{THE_REQUEST} ^GET\ (.).html\ HTTP
                          RewriteRule (.
                          ).html$ $1 [R=301]

                          remove index and reference the directory

                          RewriteRule (.*)/index$ $1/ [R=301]

                          remove trailing slash if not a directory

                          RewriteCond %{REQUEST_FILENAME} !-d
                          RewriteCond %{REQUEST_URI} /$
                          RewriteRule (.*)/ $1 [R=301]

                          forward request to html file, but don't redirect (bot friendly)

                          RewriteCond %{REQUEST_FILENAME}.html -f
                          RewriteCond %{REQUEST_URI} !/$
                          RewriteRule (.*) $1.html [L]

                          Moving the 301s above these and cleaning these up a bit should restore the 301 redirects properly and regain Moz PA.

                          BlueprintMarketing 2 Replies Last reply Reply Quote 1
                          • BlueprintMarketing
                            BlueprintMarketing @serverleap last edited by

                            <code class="language-htaccess" style="padding: 2px 6px; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; border-radius: 3px; text-shadow: #ffffff 0px 1px; word-break: normal; word-wrap: normal; tab-size: 4; background-image: initial; background-attachment: initial; background-color: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: 0px 0px; background-repeat: initial;">Glad I can help 
                            Try useing this to check it  
                            
                            http://www.redirect-checker.org/index.php </code>
                            

                            `#removes trailing slash if not a directory RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)/$ /$1 [R=301,L]

                            or
                            https://css-tricks.com/snippets/htaccess/remove-file-extention-from-urls/

                            Take the / off the end of this
                            https://regex101.com/r/oK8xL9/3 like this` ^((?:\w+/\w+)+)$

                            Seach & replace might be needed

                            <code class="language-htaccess" style="padding: 2px 6px; border: 0px; border-image-source: initial; border-image-slice: initial; border-image-width: initial; border-image-outset: initial; border-image-repeat: initial; margin: 0px; border-radius: 3px; text-shadow: #ffffff 0px 1px; word-break: normal; word-wrap: normal; tab-size: 4; background-image: initial; background-attachment: initial; background-color: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: 0px 0px; background-repeat: initial;">Hope that helps,
                            Tom</code>
                            

                            obO0B3d.png

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

                              Hope this helps,

                              Please see: https://github.com/blueprintmrk/htaccess

                              &

                              https://github.com/blueprintmrk/htaccess#redirect-using-redirectmatch

                              Removing "/."  from .PHP URLs "win-win"

                              Alias “Clean” URLs

                              This snippet lets you use “clean” URLs -- those without a PHP extension, e.g. example.com/users instead ofexample.com/users.php.

                              RewriteEngine On
                              RewriteCond %{SCRIPT_FILENAME} !-d
                              RewriteRule ^([^.]+)$ $1.php [NC,L]
                              

                              Remove Trailing Slash

                              This snippet will redirect paths ending in slashes to their non-slash-terminated counterparts (except for actual directories), e.g. http://www.example.com/blog/ to http://www.example.com/blog That is important for SEO since it’s recommended to have a canonical URL for every page.

                              RewriteCond %{REQUEST_FILENAME} !-d
                              RewriteCond %{REQUEST_URI} (.+)/$
                              RewriteRule ^ %1 [R=301,L]
                              

                              Force HTTPS

                              RewriteEngine on
                              RewriteCond %{HTTPS} !on
                              RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
                              
                              # Note: It’s also recommended to enable HTTP Strict Transport Security (HSTS)
                              # on your HTTPS website to help prevent man-in-the-middle attacks.
                              # See https://developer.mozilla.org/en-US/docs/Web/Security/HTTP_strict_transport_security
                               <ifmodule mod_headers.c="">Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"</ifmodule> 
                              

                              Force HTTPS Behind a Proxy

                              Useful if you have a proxy in front of your server performing TLS termination.

                              RewriteCond %{HTTP:X-Forwarded-Proto} !https
                              RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
                              

                              PS

                              checkout

                              https://www.nginx.com/products/ they are great!

                              Tom

                              Alias “Clean” URLs

                              This snippet lets you use “clean” URLs -- those without a PHP extension, e.g. example.com/users instead ofexample.com/users.php.

                              RewriteEngine On
                              RewriteCond %{SCRIPT_FILENAME} !-d
                              RewriteRule ^([^.]+)$ $1.php [NC,L]
                              
                              1 Reply Last reply Reply Quote 0
                              • serverleap
                                serverleap @BlueprintMarketing last edited by

                                The redirect checker website is excellent. Great find!

                                1 Reply Last reply Reply Quote 1
                                • 1 / 1
                                • First post
                                  Last post
                                • Does redirecting the existing URLs in the website without reducing our current rankings? The new website runs on the bubble, so it seems there is no provisions to redirect the existing URLs to this platform?
                                  0
                                  1
                                  51

                                • Trailing slash redirects not working in https - working in http: What might be the culprit?
                                  Tom-Anthony
                                  Tom-Anthony
                                  0
                                  2
                                  50

                                • Shortened URL is breaking when URL is in Upper Case
                                  sergeystefoglo
                                  sergeystefoglo
                                  0
                                  2
                                  265

                                • URL Help
                                  KeriMorgret
                                  KeriMorgret
                                  0
                                  4
                                  77

                                • Will changing our URL's to MVC friendly URL's have a positive or negative affect on our rankings and link juice?
                                  SanketPatel
                                  SanketPatel
                                  0
                                  2
                                  308

                                • How to count my urls?
                                  JamesFx
                                  JamesFx
                                  0
                                  3
                                  268

                                • Google also indexed trailing slash version - PLEASE HELP
                                  RanjeetP
                                  RanjeetP
                                  0
                                  15
                                  3.4k

                                • Can SEO Moz perform a full site crawl and provide a report showing all URLs within an existing domain?
                                  DCondon
                                  DCondon
                                  0
                                  7
                                  904

                                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