8
10 Comments

Hosting landing page and web app. Best practices

Hey IH,

I've been working on a web app which i've running on an AWS EC2 instance.

To speed up the process I thought about getting a wordpress landing page setup and then send users to my web app once they login.

What is the best practice here?

Should I host the landing page on a standard hosting platform and after a successful user login point him towards my AWS EC2 instace ip address?

Is this the convetional way to do it?

Thanks for helping out!

posted to Icon for group Developers
Developers
on June 19, 2020
  1. 3

    I go a step further and have all my frontends statically hosted, Netlify, S3, doesn't matter. Then I have separate backends serving those.

    e.g.
    https://portabella.io
    https://app.portabella.io/register

    The only time I'd consider running my own server to host files is if it was server side rendered I guess.

    1. 1

      This is helpful, thanks! Where do you normally recommend hosting the separate backend?

    2. 1

      Interesting. Does this make SEO tricky? Does the content/authority of each url get counted against the same domain or do you have to configure this?

      1. 2

        I can come in with a little information on this, although I am not an expert and all my research was done online.

        I know that Google indexes dynamic content as well, not just the HTML that comes from the server. So they index React apps as well. But I don't know about other search engines such as Bing.

        But I am serving my pages with server side rendering from next-js so that I know it gets cached by cloudflare as it should.

      2. 2

        To be honest I don't know. I actually don't know anything about SEO or how it works. I understand it's keyword based but haven't dived any further than that

  2. 2

    As a solo-founder I prefer having a single codebase for my landing page and app (powered by Next.js). But if you need to give non-developers the ability to edit landing page copy then it's probably a good idea to split them up.

  3. 2

    The landing page can be separated with your application. You can use a bootstrap theme, SaaS service or static site generator to get up your landing page. It doesn't matter at all.

    After user clicks login in the landing page, redirect to your application.

  4. 2

    https://twitter.com/tylertringas/status/1250521285630836741 1000s of founders recommend not having the marketing site and web app on the same domain.

    Have the app on the subdomain such as app.example.com

    I'm a little biased because I run http://versoly.com/ and we're trying to replace WP for this exact use case.

    Let me know if you want to get a landing page up in 30 minutes without the headaches of plugins, security and hosting.

  5. 1

    I always pack my applications as Docker containers and all the servers I use only have docker installed. From there, I can deploy anything I want.

    More recent I switched to kubernetes (still dockerizing my services) and deploy with a kubectl command. Works pretty well.

    But if you don't have the technical expertise to do that and you want to go for a wordpress site, I would just launch one pre-made app server image. I don't know if AWS has a one click Wordpress launch, but I know other providers do: Digital ocean, the ones that I use, but are EU-based Scaleway . I am sure you can find something similar on other services such as Linode, AWS, Google Cloud, etc.

    I also use Cloudflare positioned between my servers and the public to cache static resources (such as images, scripts, css) and block some of the malicious traffic (it will always be there, and if you will run wordpress, it's much more important. A big chunk of the traffic you will get will try to exploit your wordpress installation).

    I am working on a alternative to kubernetes which is still docker based but will abstract the whole node management thing away, my target being an easier container deployment alternative to what exists right now. I am not going to put a link because this is not this post is about.

    Hope it helps!

  6. 1

    The Pro way to do it is to have load balancers in front who do caching, minification, gzip, and SSL termination. That also makes it trivially easy to mix static content from WordPress with dynamic URLs from your webapp on the same domain.

    Since most web pages these days are bloated and unbearably slow to load, you can immediately wow potential customers by having your page being visible in 100ms or less. For that, you'll need the caching.

    You want both on the same domain because your users don't care about domains when they recommend you. So you need to make sure that if someone posts a link to their login for your app, that Google will correctly attribute that and rank your promotional content more highly. With clever redirects and Google webmaster tools, you can make that work with two domains, but I've never seen it done right in the wild.

Trending on Indie Hackers
I'm a lawyer who launched an AI contract tool on Product Hunt today — here's what building it as a non-technical founder actually felt like User Avatar 150 comments A simple way to keep AI automations from making bad decisions User Avatar 65 comments Never hire an SEO Agency for your Saas Startup User Avatar 59 comments “This contract looked normal - but could cost millions” User Avatar 54 comments 👉 The most expensive contract mistakes don’t feel risky User Avatar 41 comments We automated our business vetting with OpenClaw User Avatar 29 comments