Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. App Packaging & Development
  3. Custom subdomain per user

Custom subdomain per user

Scheduled Pinned Locked Moved App Packaging & Development
4 Posts 3 Posters 35 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ekevu123
    wrote last edited by
    #1

    I am working on an app where users can create a profile page using a custom subdomain.

    How would I handle routing? Do I have to use the cloudron API to add the subdomain to the app every single time? Do I set up a subdomain wildcard for my domain? Or is there any other solution for this?

    1 Reply Last reply
    1
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote last edited by
      #2

      Since you will need valid certificates for all domains, it makes most sense to go via the Cloudron api to add such subdomains to the app. The app internally then has to handle the delivery of content accordingly based on the virtual hostname.

      1 Reply Last reply
      2
      • J Offline
        J Offline
        joseph
        Staff
        wrote last edited by
        #3

        uou could use wildcard aliases like in https://docs.cloudron.io/apps/#aliases . i.e All of *.userpages.com is redirected then to your app. Your app's route handler should then validate the hostname checking the Host header of the http request .

        1 Reply Last reply
        1
        • E Offline
          E Offline
          ekevu123
          wrote last edited by
          #4

          Okay, thank you for the advise!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Bookmarks
          • Search