Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Best SEO Approach to Redirecting Forms

Waht is the best approach to redirect forms in a SEO friendly manner

5:59 am on Mar 3, 2009 (gmt 0)

New User

5+ Year Member

joined:June 11, 2008
votes: 0

As everyone reading this message would know, the posting of forms using the GET method typically results in long ugly, non-SEO friendly URLs. There are two obvious solutions apparent to me to make the URLS SEO friendly so that they are consistent with other links on your site and perhaps site maps:

a) Process all the form parameters on the client using javascript and redirect the browser to the SEO friendly equivalent URL.
b) Use RewriteRule to do the redirect.
c) Use the POST method.

I guess the disadvantage of a) is the extra complexity introduced by the javascript and the disadvantage of b) is that the browser needs to make two HTTP calls to get the page to ensure it doesn't show the bad URL. The disadvantage of c) is that the URL in the browser no longer reflects the current page.

Is that how everyone else sees it or am I missing something?


[edited by: engine at 9:23 am (utc) on Mar. 3, 2009]
[edit reason] No urls, please see WebmasterWorld TOS [/edit]

2:53 pm on Mar 3, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
votes: 0

Search engines don't execute JavaScript, and many users surf with JS disabled. But why would you want search engines to fetch a form-submission URL of any kind? -- This would be equivalent to the search engine submitting the form.

Also, doing client-side validation leaves your form-submission method open to inspection by the less-than-honorable denizens of the Web, and invites spoofed submissions.

I know nothing of your specific application here, but I've never found it necessary or even desirable to get rid of query strings for simple user-option-selection submissions; When the application is more complex, I use POST.

As far as "the URL in the browser no longer reflects the current page," don't confuse URLs with filepaths; The browser does in fact show the current and correct URL, and this URL is as real as it can be; Because mod_rewrite is used (in this proposal) to map the URL to a filepath, and that filepath leads to a script which generates the associated "page," that URL is quite correct, genuine, real, etc. It is no less "accurate" than a non-mod-rewritten request for the URL "example.com/" which a typical server would convert to a filepath request for /path-to-Apache/user/widgetco/www/public/html/index.html

So, I think that what you meant was that since part of the context of the page created by submitting a form is carried in the POST data and is therefore not available to search spiders, a POST URL alone does not carry all the information needed to duplicate the page a client would see after POSTing valid data. (I'm kind of talking to myself here while figuring our what you meant, and maybe this will help other readers.)

Anyway, unless there is some compelling reason that you want search engine spiders to submit forms on your site, I wouldn't do it, and I'd either use the POST method on the form or find a different way (other than a form) to accomplish the goal, in order to make the content spiderable. And yes, I am hinting at possibly using "user-agent-based content-generation" here, sometimes called "cloaking" -- but only if it's truly necessary.


10:40 pm on Mar 3, 2009 (gmt 0)

New User

5+ Year Member

joined:June 11, 2008
votes: 0

Hi - that's a great reply.

I'm not interested in search engine spiders submitting my forms. I wanted to be rid of the ugly URLs since I have used .htaccess to allow my site to work with SEO optimised URLS. I also didn't want users bookmarking the ugly URLs. Furthermore, I thought it would be better for the SEO URLs displayed to users in their browsers to correspond to the current page as much as possible since they are fairly intuitive.

Sounds like I should be using the POST method for the form and not worrying about URL equivalence.