Mobile app version of vmapp.org
Login or Join
Ravi8258870

: Robots.txt and disallow Which one is correct? User-agent: * Disallow: index.php or User-agent: * Disallow: /index.php inorder to block all pages like index.php?day=7 index.php?day=15 index.php?day=30

@Ravi8258870

Posted in: #Mediawiki #RobotsTxt

Which one is correct?

User-agent: *
Disallow: index.php


or

User-agent: *
Disallow: /index.php


inorder to block all pages like index.php?day=7 index.php?day=15 index.php?day=30

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Ravi8258870

2 Comments

Sorted by latest first Latest Oldest Best

 

@Kevin317

You can use the following robots.txt file if you wish to block all robots from accessing your pages.


# robots.txt for domain.com to block all bots

User-agent: *
Disallow: /


If you wish to block all all URLs that include a question mark (?) you can use the following format

# robots.txt for domain.com to block URL with ? mark

User-agent: *
Disallow: /*?


For more detailed information on how to write robots.txt visit the following link
How to Create Robots.txt Files

10% popularity Vote Up Vote Down


 

@Sarah324

The second one is better form as it clearly marks the index.php as being the in web root and not in some other subdirectory.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme