New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: improve web host detection in System Info #3356
Comments
We'll look into this further, but there's not a foolproof method for host detection. Tricky stuff:
@Benunc Can you provide examples of what you typically see that is unhelpful so I can get a better idea of what is being detected? |
Usually, we see things like I've learned to spot the hostingresources.com sites as Godaddy. The only one that routinely gets it right is WP Engine |
@kevinwhoffman I asked several popular hosts and they all said essentially what Dwayne said above. While it's not perfect, it's better than: |
There's not a consistently reliable way to do this across hosts based on headers. The examples you've provided for Pantheon and Siteground do not show those headers when I actually curl websites that I know are hosted by those companies. Also any use of a CDN will disguise the host. The existing functionality was forked from Woo and is based on detecting constants specific to hosting providers. The constants may be outdated and/or not in use anymore, but IMO this would be a more reliable solution because it's checking based on the server of the WordPress site that the user is logged into rather than headers based on a remote request. All of that aside, my recommended solution is to put a field in the support form and let the customer tell us where they are hosted when requesting support. |
I can go either way. I don't love the idea of more friction on the support form, and I don't think that having the host info will help enough to warrant adding a field there. I defer to @mathetos on this, but my opinion is to see if we can make those constants more reliable, and if not, just leave it alone. This has been a helpful discussion. |
@mathetos Let's discuss this on next Product Management call if you have a better approach to try. |
@kevinwhoffman Sounds good. In advance of that meeting, feel free to review this: I did a bunch of user testing with a lot of different WPers I know who use different popular WordPress hosts with that functionality plugin in order to generate this research on this: Additionally, this is the resulting function I created based on all of the above: It's unclear to me whether that was ever integrated into WPBR's final System Info host check or not, but I do know based on all the above that it does provide much more accurate and current Hostname data. |
Yes we discussed this when adding System Info to WPBR. The issue I brought up then was that the approach you shared is based on string detection from the returned value of When I tested with Pagely, for example, that string was not found. So rather than take a chance in checking for a few hosts based on strings that may or may not be present today, I just returned the raw value of The downside is that the returned value does not always clearly indicate the host. The upside is we don't "miss" on the host detection and return nothing of use. If we really wanted to nail this, I think we need to reach out to the major hosts and get an up-to-date answer on how to detect their host. This may be in the form of string detection, headers, or a server variable. Based on my experience the first time around, there was not a one-size-fits-all solution. |
I did reach out to hosts and String detection was the only way to get accurate info, but I TOTALLY agree that the fallback should instead just output that string instead of the generic message. There is not a one-size-fits-all solution at all. So this will most likely need to be updated maybe annually. But I think this is FAR more informative and helpful than the current function. I believe Pagely's output is very obvious so the function can easily be updated to reflect that. |
@DevinWalker Use the logic from https://github.com/mathetos/Whos-My-Host/blob/master/whos-my-host.php#L210-L220 and return the raw value of |
User Story
As a
support technician
, I wantto know at a glance what web host a customer is using
so thatI can tailor my responses to their specific needs
.The system info at Tools > System Info is notoriously unreliable, and almost never returns the name of a web host.
Current Behavior
I currently have to guess from context clues what the host is, or ask the customer, creating more back-and-forth.
Expected Behavior
I expect to be able to read it in the system info.
Possible Solution
According to Dwayne at Pantheon:
Steps to Reproduce
Tasks
The text was updated successfully, but these errors were encountered: