Can I (mis-) use Anvil to host a SEO friendly wrapper page as well?

For SEO reasons I want to create a wrapper homepage which main function is to load the Anvil App in an iframe next to some “crawlable” screens like manual, about etc. From my limited understanding this requires individual and fixed addresses for those screens.

Reading through the forum I often read the hint to use some other platform like e.g. wordpress, wix etc. for those screens … But as I am thrilled by Anvil’s “one platform/language to rule it all” approach, I’d be happy to realise my supporting wrapping page with Anvil as a hosting platform as well (Remark: the wrapper homepage would be nothing fancy, just some plain html with a few images and a css to match the Anvil app).

My first idea to setup a custom.html as a start-page unfortunately didn’t work as it still loads plenty of Anvil stuff and in the end results in a single page app.

So my question: Does Anvil support my idea? If so, what things do I need to setup.

Thanks & Bests
Arrne

Have you looked at this Tutorial?

You might be able to adapt and extend it to meet your wants.

You’re not alone.

There are a lot of good reasons to want to use non-hash routing for the publicly accessible URLs you want search engines to index.

I originally went the route of using iframes to mix Anvil contents with static site contents. It turned out to be a bit of a nightmare for my use case, and I instead opted for a static site with Javascript that calls out to HTTP endpoints in my Anvil app as needed, and a link on the static site that goes to the full app for the private account area (the parts that shouldn’t be indexed).

For me part of the benefit was being able to isolate the parts of the site that tire-kickers would be using frequently to the static only site, so that they wouldn’t be using compute resources from the Anvil app.

I know that others here have used iframes, though, and have had it work fine for their use cases. So I’d say experiment with some prototypes and see what works for what you’re trying to do.

And as Paul notes, you can do the entire site in Anvil, although at that point you’re using hash routing URLs. If you ever switch away from Anvil to another platform you’ll most likely break any links to pages on your site that exist on the web.

1 Like