Google indexing with route decorator

Okay, now I am trying to add the routes for my other forms that also require indexing. I understand that the startup form will not need the route added in order for Google to index it. My other forms are in the following structure: there is a form that serves as the page frame that holds the footer etc., and then a form (“main panel”) gets swapped out. I need for Google to index a URL for the combination of the page frame and the main panel form.

I’m confused on some points.

  1. In the Forum post (Serve anything, anywhere on your domain, with @anvil.server.route()), there is a discussion of responding to a path within the app’s domain with anvil.server.route

I assume that goes in the server page. I know how to point to an anvil.server.callable from a form, but is pointing to an anvil.server.route done the same way? Do I say something like anvil.server.route(“/dictionary”) from my form (to point to the decorator on the server page)? Because doing so throws an error (anvil.server has no property route). And further, why would I only want to use the anvil.server.route ? If I understand correctly, that only allows, say, Google to index that page. But it does not create a URL that others could use to reach that page from, say, a Google search listing. Am I correct in this? So, then, of what practical use is anvil.server.route ? Okay, I could imagine a practical user might be to return a description meta tag or somehow reveal this to a Google spiderbot (as an example), but I am not sure how to do this from available documentation.

  1. Okay, again as discussed in the Forum post (Serve anything, anywhere on your domain, with @anvil.server.route()), if I want to serve a human-accessible UI on a particular URL (which I want to do, if only from listings provided to human users of a Google search), it is clear that I will need to return a FormResponse object. Okay, but again, how do I call that from a form? And how can I call it from my particular form, such that when a human uses the resulting URL. it will create a page that will include both my outer from for the page as well as the interior (main panel) form? I believe I understand how to pass an argument into the Form Response object from the documentation now available. But I am not sue how to do the rest.

As always, I am very grateful for the expertise of this community. I’m making progress with my site (instareport.us) and I would not be here without your expert help. Thank you in advance!

Regards,
Drew

1 Like