Is it okay for robots.txt ?

01rahat01

Newbie
Joined
Jan 30, 2023
Messages
6
Reaction score
2
for PHP and laravel based websites these two lines are okay ? Or have to add something else for crawling search engines?

User-agent: *
Disallow:


I added this line to my robots.txt file and put it in my public_html directory
 
the User-agent: * part tells ALL bots to do something, but I'm not sure that the Disallow: part is accurate. I usually see it accompanied by a / or a folder's name or something, I'm not sure that a naked Disallow: will do anything (I'm not techy enough, sorry)

And yeah, robots.txt should go into public_html for sure...
 
Your command will not take any action because it is empty.
 
With that setup, you're allowing all bots to crawl everything on your site. Generally okay, but might want to reconsider if you've got any private folders or data.For a PHP or Laravel site, this basic setup is fine. Just remember, if you've got any admin paths, staging areas, or anything sensitive, it's wise to disallow those.
 
Back
Top