Error: 404 not found

Hey guys,
I got this weird issue, my magento2 site home/landing url sometimes go 404 not found. It kinda happens randomly but after some minutes of trying it will go back.

Note:
-Other pages are working only home/landing url goes 404 not found.
-After awhile the home/landing url would be back without the problem.
-We do use certificate from cloudflare. purchased from cloudflare
-We have few firewall rules but not specifically targets the home/landing url aside from country blocks.

1 Like

A 404 from your server should show up in your server logs. Have you seen anything there?

1 Like

In error log, here’s some of the items:

2021-04-16 02:55:48 UTC [nginx][error] 97377#0: *290470 openat() "/home/u7-86u4vu293wh9/www/mysitehere.com/public_html/.well-known/security.txt" failed (2: No such file or directory), client: 149.28.40.172, server: mysitehere.com, request: "GET /.well-known/security.txt HTTP/1.1", host: "www.mysitehere.com:443"
‮
2021-04-15 23:09:57 UTC [nginx][error] 97377#0: *284754 openat() "/home/u7-86u4vu293wh9/www/mysitehere.com/public_html/.well-known/apple-app-site-association" failed (2: No such file or directory), client: 66.249.89.106, server: mysitehere.com, request: "GET /.well-known/apple-app-site-association HTTP/1.1", host: "www.mysitehere.com"
‮
2021-04-15 18:24:24 UTC [nginx][error] 97376#0: *277519 openat() "/home/u7-86u4vu293wh9/www/mysitehere.com/public_html/.well-known/dnt-policy.txt" failed (2: No such file or directory), client: 198.199.104.179, server: mysitehere.com, request: "GET /.well-known/dnt-policy.txt HTTP/1.1", host: "mysitehere.com"
‮
2021-04-15 05:26:47 UTC [apache][authz_core:error] [pid 86774] [client 104.154.228.70:39600] AH01630: cli    ent denied by server configuration: /home/u7-86u4vu293wh9/www/mysitehere.com/public_html/dev/
    ‮
    2021-04-11 21:03:39 UTC [apache][autoindex:error] [pid 43547] [client 110.54.249.35:48260] AH01276: Cannot serve directory /home/u7-86u4vu293wh9/www/mysitehere.com/public_html/pub/errors/default/: No matching DirectoryIndex (index.php) found, and server-generated directory index forbidden by Options directive
    ‮
    2021-04-11 05:28:46 UTC [apache][authz_core:error] [pid 93432] [client 45.55.39.163:44366] AH01630: client denied by server configuration: /home/u7-86u4vu293wh9/www/mysitehere.com/public_html/app/etc/local.xml, referer: http://mysitehere.com/app/etc/local.xml

in access log, I tried finding 404 errors there but all I see was someone trying to access a url of image that doesn’t exist.

Sample:
2600:387:8:9::1a www.mysitehere.com - [16/Apr/2021:03:54:15 +0000] “GET /media/email/logo/default/site-logo-website.png HTTP/1.1” 404 29421 “-” “Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148” | TLSv1.3 | 1.737 1.759 1.760 MISS 0 NC:000000 UP:SKIP_CACHE_SET_COOKIE

2600:387:8:9::1a www.mysitehere.com - [16/Apr/2021:03:53:26 +0000] “GET /favicon.ico HTTP/1.1” 404 29291 “https://www.mysitehere.com/customer/account/login/referer/aHR0cHM6Ly93d3cubGVjYXJkcy5jb20vY3VzdG9tZXIvYWNjb3VudC9pbmRleC8%2C/” “Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1” | TLSv1.3 | 0.696 0.715 0.717 MISS 0 NC:000000 UP:SKIP_CACHE_SET_COOKIE

404 Not Found ( RFC7231 )

Origin server was unable or unwilling to find the resource requested. This usually means the host server could not find the resource. To serve a more permanent version of this error one should use a 410 error code.

These errors typically occur when someone mistypes a URL on your site when there is a broken link from another page, when a page that previously existed is moved or removed, or there is an error when a search engine indexes your site. For a typical site, these errors account for approximately 3% of the total page views, but they’re often untracked by traditional analytics platforms like Google Analytics.

Website owners usually implement a custom page to be served when this error is generated.

Cloudflare does not generate 404s for customer websites, we only proxy the request from the origin server. When seeing a 404 for your Cloudflare powered site you should contact your hosting provider for help.

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