[Support request] "URL contains a form with a GET method"

Home Forums Support "URL contains a form with a GET method"

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #901854

    Hi Guys,

    After some annoying spam problems using my search form, I’m running my site through SiteBulb, and it reports the following on my 404 page: “URL contains a form with a GET method”, and states these as the potential pitfalls “These URLs can be cached, and accessed directly by anyone that knows the URL (including search engine crawlers).
    If there are no restrictions on the input fields, this can allow the generation of infinite unique URLs.”

    It says this is the problem:
    <p>It seems we can’t find what you’re looking for. Perhaps searching can help.</p>
    <form method=”get” class=”search-form” action=”https:// my domain .com/”>

    I am not very techhy and a bit dumb about this stuff, but is it necessary or possible to change this to “post” or something? I’ve been having a problem lately with spam links being generated from my search bar and millions of Korean porn links pointing to these non-existent pages.. could this be the issue?

    I look forward to hearing from you – and congratulations on your 5th Birthday!!

    Lead Developer
    Lead Developer

    Hi there,

    The form itself is provided by WordPress – we use the get_seach_form() function to generate it here: https://github.com/tomusborne/generatepress/blob/2.2.2/no-results.php#L63

    You can remove it by creating a child theme, and copying the no-results.php file into it. Then you can remove that function and the form should go away.

    I don’t believe it’s possible to change it to post.

    Let me know if you need more info 🙂

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.