Missing trailing slash in URL on subpages resulting in Moz PA of 1
-
Even here in moz community I am noticing it. Is it really a factor to have an ending slash on the page? Does it make a difference? Our website has a homepage PA of 63, DA of 56 but all of our sub-pages are just 1 and they have been up for 4 months.
-
The redirect checker website is excellent. Great find!
-
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/
tohttp://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]
-
<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>
-
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.
-
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 OKHTTP Headers
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/ |
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 |
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:"
- · Select different User Agents like
-
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
-
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.
-
The 301 redirect has existed for 4 months and a day. Why has it not assumed PR with Moz?
-
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.
-
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.
-
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
-
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.
-
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
|
-
Look at this http://cl.ly/faXF
compare with
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
-
You have 2
Access-Control-Allow-Origin: *
Access-Control-Allow-Origin: *
Server: UltraSpeed Hosting by UltraWebHosting.com
Date: Sun, 03 Apr 2016 08:06:06 GMT
Content-Type: text/html
Content-Length: 34133
Connection: keep-alive
Vary: Accept-Encoding
Last-Modified: Sat, 26 Mar 2016 05:37:53 GMT
Access-Control-Allow-Origin: *
Access-Control-Allow-Origin: *
X-Cache: HIT from Backend
Accept-Ranges: bytes
Access-Control-Allow-Origin: *
Access-Control-Allow-Origin: *
-
thank you for providing me with that URL I will take a look right now
-
Unfortunately this does not quite answer the question. The structure is by design but I am having my second thoughts after reviewing Moz and seeing this occurrence. Why are all sub-directories which do not end with / have a moz trust of 1? This even occurs here in the community forum. When the DA is 56 and the pages have been around for four months and are all linked from the homepage shouldn't they have a PA? Is the lack of a trailing slash a factor?
https://www.ultrawebhosting.com
Ex:
https://www.ultrawebhosting.com/about
https://www.ultrawebhosting.com/dedicated-servers -
Are your subpages subdomains? Or subfolders? I'm going to assume they are subfolders.
If you're domain authority changes because of your page, that would be the only thing that would make me think you're talking about a subdomain.
PA 63 & DA 56 your site will be crawled quickly because it has decent domain authority just because your homepage has high page authority does not mean the rest of the site will.
It is not unusual for a brand-new page to have little page authority you can check if your forward slash "/" is being forced use screaming frog, redirect mapper, or https://varvy.com/tools/redirects/
You can then force a "/" or prevent one depending on what you find. Using regex
Name: Redirect my contact page
Domain: www.domain.com
Source: ^/old-path/contact-us/?$
Destination: /new-path/contact-us/
Redirect type: 301 Permanent- This Redirect Rule will match a URL of http://www.domain.com/old-path/contact-us -or- http://www.domain.com/old-path/contact-us/
- The variation is because of the Regex Syntax “/?$”
- The Question Mark “?” makes the Trailing slash Optional
- It will also only match the Source if it Starts with a “/” (note the carrot “^” ), or ends with either “s” or “/” (note the ending “$” )
https://wpengine.com/support/regex/
http://stackoverflow.com/questions/16657152/matching-a-forward-slash-with-a-regex
This depends on your server, and what language are using so, I strongly suggest you use tool to verify your changes before making them.
https://regex101.com/r/oK8xL9/1
I hope this helps,
Tom
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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.
Related Questions
-
Shortened URL is breaking when URL is in Upper Case
Hi there, Currently I'm having some troubling mitigating an odd occurrence with some redirected shortened URLs being in upper case. Here is how they should be behaving - www.rhinosec.com/webapp -> https://rhinosecuritylabs.com/landing/sample-report-webapp-pentest/
Web Design | | BCaudill
www.rhinosec.com/network -> https://rhinosecuritylabs.com/landing/sample-report-network-pentest/
www.rhinosec.com/se -> https://rhinosecuritylabs.com/landing/social-engineering-example-report/ but when the /______ is capitalized - for example - WEBAPP, NETWORK, SE; WordPress either gives me a 404 or guesses the pages and lands on: NETWORK = https://rhinosecuritylabs.com/assessment-services/network-penetration-testing/
SE = https://rhinosecuritylabs.com/assessment-services/secure-code-review/
WEBAPP = 404 I was wondering if this discrepancy should be taken care of in the Htaccess file, Cloudflare, or WordPress redirect plug-in?0 -
URL & Link Hierarchy - juice flow direction from backlinks?
Our site is very regional, so we focus all of our seo efforts on each of these region landing pages. For Example: domain.com/toys/us/ca/san-francisco We added an informational page (ex. reviews) and gave it a url like this: domain.com/toys/us/ca/san-francisco/reviews Question: Will external backlinks to domain.com/toys/.../reviews provide any link juice value to it's hierarchical parent page: domain.com/toys/us/ca/san-francisco?
Web Design | | 42Floors0 -
When Site:Domain Search Run on Google, SSL Error Appears on One URL, Will this Harm Ranking
Greetings MOZ Community: When a site:domain search is run on Google, a very strange URL appears in the search results. The URL is http://www.nyc-officespace-leader.com:2082/ The page displays a "the site's security certificate is not trusted." This only appears for one URL out of 400. Could this indicate a wider problem with the server's configuration? Is this something that needs to be corrected, and if so how? Our ranking has dropped a lot in the last few months. Thanks,
Web Design | | Kingalan1
Alan0 -
Magento URL Structure
I'm about to migrate to Magento and wanted to ask about the optimal URL structure for the following page: Knowledge Centre |-Videos |-Customer Testimonials |-Customer X Would it be better to use: Domain/knowledge-centre/videos/customer-testimonials/customer-x or Domain/customer-x Thanks in advance for any replies.
Web Design | | ssoneil0 -
Keywords in the page url for best SEO
Hello all, I am working in the keywors structure of a web and I have the following doubt: If I want to target these keywords: great food madrid and my website is: http://www.madridlive.com I do not know if I should keep either: OPTION 1: page url: www.madridlive.com/great-food-madrid or OPTION 2: page url www.madridlive.com/great-food I do not know if the search engines "understands" madrid in "madridlive", therefore I can avoid the "madrid" keyword, dicarding option 1 and going for option 2. Additionally I avoid duplication of the madrid keyword that can be seen as redundancy and also have a shorter page url. Thank you very much and sorry for such a question but I am new in this SEO field...just the excellent SEOMOZ's SEO Guide for beginners! Best regards, Antonio
Web Design | | aalcocer20030 -
How do I reduce my vast number of errors that SEO Moz has picked up?
Hi, The number of errors on my site recently jumped up by 450. Most of them are duplicate page content and title errors. I am confused as to how the site suddenly got so many errors. I recently added a new sitemap extension to the site as I was told by my developers that it was hacked a couple of months ago. Please could someone help resolve these errors?
Web Design | | Saunders18650 -
URL question for SEO...
I'm thinking of creating a new url off an existing url and was wondering if there would be any impact. For example I have the URL www.baseball.com and rather than secure a new url for a new product launch such as www.newbaseballproduct.com I want to do newproduct.baseball.com Will this hurt my SEO rankings for this new site? Basically wanting to figure out if this will hurt me or not? Should I get a new url or re-utilize an existing URL... really for a landing page/micro site, etc.,
Web Design | | gritacco0 -
What Is Our Site Missing Causing Our Former Dominance To Slip?
So we have operated one of our retail sites, BonitaJ.com for many years now. Through a lot of work, link building and optimizing around 2009, we were in a prominent spot on the 1st page in google for just about every main term we were targeting. Towards the end of 2009, nearing December or so, we started slipping here and there, and began being displaced for our main terms by newer sites that according to several factors, don't have near the strength our site holds. And by strength, I simply mean, based on link volume, mozbar stats and many other factors, it seems we should rank well above most, but still find ourselves just hanging to 8-10 positions on page one, and in many cases somewhere on page two for terms it seems like we should be in the top 5 positions for. I believe some of our slippage is due to google's devaluing of many of our incoming links. We achieved our early ranking dominence off a lot of directory links and things like that over time, but ever since 2009 when links began getting devalued we immediately broke into getting quality blog links via LEGIT blog relationships where we'd offer up contests, bloggers would review our products and so on, and these relationships continue through today. We also do a lot of guest blog writing, article postings on various networks, as well as press releases, all with the goal of keeping our link profile happy and healthy. So we still have work to do there, but we're on the right track. So my thought is that to get back over the hump, we simply need to continue with the legit link building methods, but I'm also thinking that maybe we need to improve some things navigationally. Things I was hoping people would chime in on are.... 1. If we're mainly trying to target bridal/wedding related jewelry terms, should we ditch the "Jewelry Sets, Pearl Jewelry & Swarovski Crystal Jewerly" terms from our main navbar. They are featured inside each of the categories, and in the end, we don't rank or pull traffic for them anyway. Would ditching them from the main nav, help pass more juice from home page and other pages to the pages that better target our niche? 2. A while back, we ditched including actual product on each of the main category pages. I'm leaning towards breaking the main category pages up into sections, for instance once on the "Bridal Jewelry" page, it would list each of the sub-cats, with a 5-10 product sampling of the most popular items, with a link that says "view all necklaces" at the end of each sub-section. Do you think that more wise than just trying to direct them into the sub-cats with no actual product offering? 3. Anything else you see glaringly wrong with what we're trying to do? This site is just on the edge of blowing up from a ranking perspective if I can just get some confirmation on some things that I know I should do, but I'm wary due to fear of screwing things up. If I can get some solid feedback, the rest is history.
Web Design | | AarcMediaGroup0