Prevent form action from being followed by robots

- 1 answer


Is there a way to prevent robots to follow form actions? I get errors like this:

Uncaught TYPO3 Exception: #1298012500: Required argument "form" is not set for Tx_Powermail_Controller_FormsController->create.

This cause robots try to follow this links via GET request.

I'm using the powermail extension and this will use the fluid ViewHelper f:form. I tried to remove the action parameter, but this parameter will appear anyway.




You can't prevent malicious bots from trying to access that action. You can only hope to make friendly bots ignore it.

To do that, try to add the attribute to the form tag. It tells robots that you don't want the link to be followed. It would look like this in fluid:

<f:form [...] additionalAttributes="{rel: 'nofollow'}">...</f:form>

I'm not sure that it'll actually prevents bots from calling the action.

A (possibly not applicable) alternative way would be to add a <meta name="robots" content="index,nofollow"/> to the pages <head>. (Maybe replace index with noindex.)