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
-
Second Store URL
Our store has been up and running for about 18 months and has been more successful than expected. Unfortunately we have run into a few minor issues with customers wanting to pick up in store but much of the online parts we sell are drop ship. We have made the decision to open a second store. One will support our brand (using current URL)and reflect products and pricing we offer at our B&M locations. The second will continue down the path we have been going but under a completely different brand (and URL) in no way tied to our B&M stores. My question is this: Would it be smarter to re brand the store we have now and change the URL.?We would then create the second site as our corporate branded site. Or do we adjust the currently site and then create a second site with the new brand. The only real hold up is that the re branded store will generate far more revenue and the current site is optimized very well. However if i change the URL the optimization will go out the window .
Web Design | | Rillik0 -
URL Structure's Effect on SEO
Hello all, I have a client who currently has a very poor URL structure. As it stands, their URLs are formatted in the following manner: http://www.domain.com/category/subcategory/page In all my years of SEO, however, I have always tried to implement the following format: http://www.domain.com/category/page The web designer for this particular project has been very reluctant to change the structure for obvious reasons, but I'm convinced that by modifying the URL structure, SEO will improve. I am correct in thinking this? Likewise, if I am able to get the URL structure changed, what do I need to look out for to make sure we don't lose any traction for our keyword terms? Any and all insight/suggestions is greatly appreciated. Thanks for reading!
Web Design | | maxcarnage0 -
URL Structure's Effect on SEO
Hello all, I have a client who currently has a very poor URL structure. As it stands, their URLs are formatted in the following manner: http://www.domain.com/category/subcategory/page In all my years of SEO, however, I have always tried to implement the following format: http://www.domain.com/category/page The web designer for this particular project has been very reluctant to change the structure for obvious reasons, but I'm convinced that by modifying the URL structure, SEO will improve. I am correct in thinking this? Likewise, if I am able to get the URL structure changed, what do I need to look out for to make sure we don't lose any traction for our keyword terms? Any and all insight/suggestions is greatly appreciated. Thanks for reading!
Web Design | | maxcarnage0 -
Keywords in url - specific case question
There are a bunch of questions about keywords in the url and so far what I've gathered is that it's good to have them but keep it simple so it doesn't look stuffed. I'm working on redesigning some sites that were originally setup by a group who had no understanding of SEO (or perhaps I should say a misunderstanding) and spent a lot of time stuffing keywords EVERYWHERE. In some cases they weren't too far off but in others I think they just went overboard. One of the areas I'm trying to fix are the paths which leads to the following concerns. One of the sites has a basketball section and through the use of the Adwords keyword tool they determined that most people are searching for "basketball hoops". My first question is, how reliable are the monthly search numbers in the Adwords keyword tool? Are they accurate enough to warrant forming keyword strategies based on the results? As it relates to the url issue, the current tree for the basketball section of the site looks like this: /basketball (the landing page for the whole section, there are other sport specific pages as well) /basketball/hoops (goes nowhere. not sure why they didn't just go to /basketball-hoops/x for other pages) /basketball/hoops/72in-backboards (the systems are split into three different backboard sizes, these pages group them onto one overview page per size) /basketball/hoops/72in-backboards/specific-basketball-goal (the actual basketball goal details page with options to buy and such) So what I'm wondering about this setup is: does having /basketball/hoops take care of having the "basketball hoops" search term or would it be more effective to switch to /basketball-hoops? If it's fine to leave it at /basketball/hoops, do you think it would be beneficial to create an actual page for that path? We found that actually more people search for "basketball basket" than "basketball hoops" so maybe that would be a good page to try to make use of that term and explain maybe why people think "basket" instead of "hoop" and why we call ours "goals" or something. I tend to navigate pages by deleting path arguments and I hate when I land on a nonexistent path so I'm leaning toward changing the paths but just don't know if it's worth it at this point. Additionally, on one of the other sites, we have a domain that is the main keyword we want to rank for: swingsets.com The other company I mentioned then decided to put all of the product pages under: swingsets.com/swing-sets/{category}/{set-height}-{'swing-set'|'playset'|'swingsets'|'play-set'|etc...}/combo{#} So that comes out to look something like this: swingsets.com/swing-sets/outback/5ft-playsets/combo2 I've never liked that path setup. It looks stuffed to me, especially once they start using '5ft-swing-sets' and '6ft-play-set' on other product pages. It's inconsistent which is another issue I have since I tend to surf by path. Another issue with that setup is the final argument of combo{#} but there's nothing I can really do about that because they call the products out as combinations. The only actual product name is the "outback" part. I've been trying to come up with a better path setup for a long time now but again I'm concerned that I may just be wasting my time. The only thing I did do was make the height section consistently {height}-playsets. Is that good enough or should these paths remove /swing-sets from the beginning? The actual /swing-sets page is a good and valuable landing page but then I'm not sure if it remains valuable to keep it in the paths for the product pages afterward. Any insight into this dilemma would be appreciated. I've been stewing over this for a long time and my reasoning always becomes circular since I can see plenty of reasons for keeping them the way they are and simplifying them.
Web Design | | EscaladeSports0 -
Any way of showing missed sales in Google Analytics?
Sit down, this might get a little complicated... I was approached by a design company to do some SEO work a client of theirs. Usually, this stuff is white label but I have direct contact with the client as the design agency felt it was easier for me to do this. The website is performing really well and looking at the sales funnel, I'm getting people wanting to buy. BUT, and here's the problem, everything falls apart because of the way the check out works. It's appalling. The customer has to register to buy a product, there's no guest check out or anything. The checkout button is right below the fold and you'd miss it completely if you didn't actually search for it. Basically, it's losing the client money. Last month alone there were 300~ people entering the conversion funnel and NONE of them complete it. I've been talking with the design company and they basically saying that it's too much work for them to change it, it's a signed off project blah blah. UI reports have been conducted and sent to them but still nothing. I have the client asking (a great client, obviously wondering why there is a lack of return on his investment) why he isn't making money. He's asking me because I'm the guy thats meant to be getting him the cash back. I keep saying to the design agency the problems and that it's never going to make money. The potential is massive. But thats my problem. Is there ANY way in GA to calculate the missed sales? I know that I can view the total amount made when the customer successfully checks out but I need figures to present that I'm leading the horse to water, but the check out system is preventing it from drinking. tl;dr I need to show client/design agency missed sales due to poorly built checkout system. Cheers!
Web Design | | jasonwdexter0 -
Is it better to redirect a url or set up a landing page for a new site?
Hi, One of our clients has got a new website but is still getting quite a lot of traffic to her old site which has a page authority of 30 on the home page and has about 20 external backlinks. It's on a different hosting package so a different C block but I was wondering if anyone could advise if it would be better to simply redirect this page to the new site or set up a landing page on this domain simply saying "Site has moved, you can now find us here..." sort of idea. Any advice would be much appreciated Thanks
Web Design | | Will_Craig0 -
Can you use a base element and mod_rewrite to alleviate the need for absolute URLs?
This is a follow up question to Scott Parsons' question about using absolute versus relative URLs when linking internally. Andy King makes the statement that this can be done and that it saves additional space (which he claims then can improve page speed). Is this a true and accurate statement? Can using a base element and mod-rewrite alleviate the need for absolute URLs? I need to know before going off on a "change all of our relative URLs to absolutes" campaign. Thanks in advance! Dana
Web Design | | danatanseo0 -
301 Redirect ! Joomla Pages, Already ranking. ( just wanted to change the url
hey guys hope everyone had a new year. I am ranking for a page on my site that i want to ( not specifically move ), but just change the url name: It is too long i think and i want to move it from one portion of my architecture to another menu. I have never physically done a 301 redirect myself, always had someone do it for me. I wanted some pointers. Since it is a fairly new site 4 months old! What are my options. Do i need to 301 redirect the page, if i am changing the Structure and AI of my site, or can i just change the url as is and it will still get ranked? How do i keep that url put delete the page and redirect it ? Sorry its very simple but i wanted to get the communities help to continue on ! Best Wishes HAmpig
Web Design | | BizDetox0