robots.txt in Laravel
18,622
Remember, that website address is relevant to public dir. So,
if you want robots.txt to work in Laravel, it must be placed in the public
folder.
Author by
rolfo85
Updated on June 13, 2022Comments
-
rolfo85 over 1 year
I just was wondering if the robots.txt file is supposed to work like general robots txt files. So, you type for example "disallow/admin/*" place it into the the root Laravel folder and that's it.
Is it like this ?
-
Trisno Raynaldy about 4 yearsBruh, is it ok to let it being accessable from the site/browser?
-
Kat Lim Ruiz about 2 yearsyes. robots.txt should be public
-
Marko over 1 yearThe OP asked about robots.txt specifically in a Laravel application. Your answer does not address the OP's question in any relative or meaningful way as the OP didn't ask WHAT a robots.txt file is, nor did the OP ask where you would place a traditional robots.txt file. In a Laravel app, the web entry point is at /public in the index.php file as pointed out by Michal G above.