-1

We have a web application that each user has their own address like our-app.com/user1. Our users want to use their own domain and redirect to their pages on our app. For example www.user1.com => our-app.com/user1

We will provide a simple interface in our application that asks for their own website IP/URL and redirect their website to ours.

Should we setup a DNS server to achieve this or can we use mod_rewrite? What is the best way to solve this?

Many thanks.

1
  • What does redirect to their pages on our app mean? Please clarify details of what is the expected result, an internal redirect or HTTP redirect? Sep 22, 2022 at 5:47

1 Answer 1

2

We will provide a simple interface in our application that asks for their own website IP/URL and redirect their website to ours.

You can't do that. That would be a major security vulnerability.

They have to point their domain at you. Either by creating DNS records on their own nameserver, or by pointing to your nameservers.

What you have to do depends on which of the scenarios you prefer; probably the easiest one is to have them point a record at you, in which case mod_rewrite can be part of the solution.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .