NGINX/my_webapp bingbot support

:uk:/:us: NGINX/my_webapp configuration to support bingbot (english)

Hello to the yunohost team & community!

Beforehand, I’d like to salute all the great work done so far by everyone! It has been a pleasure to use yunohost and upgrade it through the years without the trouble I would have met otherwise.

I do have searched thoroughly the forum, corresponding app github and inside the server files but could not find something to troubleshoot my issue…
So, here I am, full of hope :slight_smile:

My YunoHost server

Hardware: VPS OVH (kimsufi)
YunoHost version: 4.2.8.1 (stable)
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes

nginx my_webapp.conf has been modified:

# Default indexes and catch-all
    index index.html index.php;
    try_files $uri $uri/ /index.php?$args;

has been replaced with:

# Default indexes and catch-all
    index index.html index.php;

# 404 handle to serve page in folder instead of generic nginx page
    error_page 404 /404.html;
    try_files $uri $uri/ /index.php?$args =404;

and this line has been commented:

    # Include SSOWAT user panel.
#    include conf.d/yunohost_panel.conf.inc;

Description of my issue

I’ve been using the Custom Web app with SFTP access for a classic website (vanilla HTML (5) / CSS (3) / JS (ES5)) served on the main default domain. So far, so good, great work on the app maintainers & yunohost side!

I tried to comply with search engines requirements for SEO such has feeding them the sitemap.xml URL in their respective webmaster tools.

Google and Yandex did not complained, everything has been crawled successfully.

But, Bing, on the other hand, has issued an error with no additional information.

I contacted their support to investigate and received some generic troubleshooting instructions mentioning their bot not getting the valid 200 status code, therefore preventing their bot to access the website.

Here is the answer I got:

Often when I see these issues it is caused from a block that has been implemented preventing our Bots from reaching your site. You have to check with your Web Host/Web Service Provider, .htaccess files, virus detection, and data center for any unintentional blocks placed on our User Agents.

Upon checking in fetch URL tool, I see your website URL have no https status code and showing as zero (not working). Our Bingbots are not able to crawl your site, as bots will crawl only 200 status code pages. In this case I request you to please make your site to 200 status code, so that our bots will find your page and crawl your pages.

I mentionned I would not have met any issue with other search engines, use nginx therefore would not use .htaccess files. I investigated on the server and found that the bingbot would receive a 301 status code response so I mentionned that there was an automatic redirection from http to https and asked if the bot was indeed using http instead of https and if we could investigate together. I received exactly the same answer.

here is the result of sudo grep bingbot /var/log/nginx/ebim-studio.com-access.log:

40.77.167.39 - - [13/Sep/2021:07:39:00 +0000] "GET / HTTP/1.1" 301 178 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
183.136.225.56 - - [13/Sep/2021:08:28:46 +0000] "GET / HTTP/1.1" 301 178 "-" "Baiduspider+(+http://www.baidu.com/search/spider.htm);googlebot|baiduspider|baidu|spider|sogou|bingbot|bot|yahoo|soso|sosospider|360spider|youdaobot|jikeSpider;)"

Here is the robot.txt

Sitemap: https://ebim-studio.com/sitemap.xml

User-agent: *
Disallow:/doc/
Disallow:/legal/
Disallow:.editorconfig
Disallow:.gitignore
Disallow:.gitattributes
Disallow:.gitmodules

I’ve searched on the forum & internet but could not find why this was happening or a way to solve this issue, therefore I’m asking the yunohost community in case someone has already stumbled upon this or has an idea to what would cause this behavior.

Cheers,
vey


:fr: Modèle de message (français)

Bonjour à l’équipe et à la communauté yunohost !

Avant de commencer, je voudrais saluer l’excellent travail accompli par tous jusqu’à présent ! Cela a vraiment été un plaisir d’utiliser et mettre à jour yunohost à travers les années, sans aucun des problèmes que j’aurais rencontré par moi même.

J’ai enquêté intensément à travers le forum, le github de l’application et sur le serveur lui même mais je n’ai pas réussi à trouver quoi que ce soit pour résoudre mon problème…

Alors, je me lance, plein d’espoirs :slight_smile:

Mon serveur YunoHost

Matériel: VPS OVH (kimsufi)
Version de YunoHost: 4.2.8.1 (stable)
J’ai accès à mon serveur : En SSH | Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : oui

la configuration nginx pour my_webapp.conf a été modifiée :

# Default indexes and catch-all
    index index.html index.php;
    try_files $uri $uri/ /index.php?$args;

a été remplacé par :

# Default indexes and catch-all
    index index.html index.php;

# 404 handle to serve page in folder instead of generic nginx page
    error_page 404 /404.html;
    try_files $uri $uri/ /index.php?$args =404;

et cette ligne a été commentée :

    # Include SSOWAT user panel.
#    include conf.d/yunohost_panel.conf.inc;

Description du problème

J’utilise l’application Custom Web app with SFTP access pour avoir un site web classique (vanilla HTML (5) / CSS (3) / JS (ES5)) servi sur le domaine principal par défaut. Jusque là, tout va bien, bravo aux équipes de my_webapp & yunohost !

J’ai voulu être en conformité avec les pré-requis des moteurs de recherche en matière de SEO, comme leur fournir un lien vers le sitemap.xml au travers de leurs outils webmaster respectifs.

Google et Yandex n’ont pas bronché, tout a été récupéré avec succès.

Par contre, Bing, pour sa part, retourne une erreur, sans plus d’informations.

J’ai contacté leur support afin de leur exposer la situation et j’ai reçu une réponse générique indiquant que leur bot ne recevait pas le status code 200, l’empêchant d’accéder au site.

Voici la réponse que j’ai reçu :

Often when I see these issues it is caused from a block that has been implemented preventing our Bots from reaching your site. You have to check with your Web Host/Web Service Provider, .htaccess files, virus detection, and data center for any unintentional blocks placed on our User Agents.

Upon checking in fetch URL tool, I see your website URL have no https status code and showing as zero (not working). Our Bingbots are not able to crawl your site, as bots will crawl only 200 status code pages. In this case I request you to please make your site to 200 status code, so that our bots will find your page and crawl your pages.

J’ai répondu que je n’avais pas eu de problèmes avec les autres moteurs de recherche, que le serveur utilisait nginx et ne pouvait par conséquent pas avoir de .htaccess. J’ai cherché sur le serveur et j’ai découvert que le bingbot recevait un status code 301. J’ai donc également indiqué que le serveur gérait automatiquement la redirection du traffic http vers https et j’ai demandé si, par hasard, le bot n’utilisait pas http au lieu de https et si nous pouvions enquêter ensemble. J’ai reçu la même réponse.

Voici le résultat de la commande sudo grep bingbot /var/log/nginx/ebim-studio.com-access.log:

40.77.167.39 - - [13/Sep/2021:07:39:00 +0000] "GET / HTTP/1.1" 301 178 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
183.136.225.56 - - [13/Sep/2021:08:28:46 +0000] "GET / HTTP/1.1" 301 178 "-" "Baiduspider+(+http://www.baidu.com/search/spider.htm);googlebot|baiduspider|baidu|spider|sogou|bingbot|bot|yahoo|soso|sosospider|360spider|youdaobot|jikeSpider;)"

Voici le fichier robot.txt

Sitemap: https://ebim-studio.com/sitemap.xml

User-agent: *
Disallow:/doc/
Disallow:/legal/
Disallow:.editorconfig
Disallow:.gitignore
Disallow:.gitattributes
Disallow:.gitmodules

J’ai cherché sur le forum & internet mais n’ai pas trouvé pourquoi cela se produisait ou une manière de résoudre mon problème, ce qui me pousse à vous lancer cet appel à l’aide, des fois que quelqu’un de la communauté yunohost ait déjà rencontré ce problème ou sache ce qui le cause.

Santé,
vey

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.