-2

Background

I want to create a service where I need to register a domain and point it to the app. The problem is, the app needs to know what the domain parameter is. So I analysed this question about domain aliasing but did not understand if it fits my needs.

Scenario

I want to offer customers an option where they can map their own domains to my server. Like for example bandcamp (custom domains @ band camp)

If I forward the domain with an A record and on my app, have a Wildcard A record ready wouldn't that conflict with the other domains I host on my dedicated server?

Should I put the wildcard domain on it's own IP address (is this the proper way to do it?)

Please tell me, thank you.

Community
  • 1
  • 1
Herr
  • 2,725
  • 3
  • 30
  • 36

2 Answers2

0

Is example.com/info the URI of the app? And the example.com/info/user/123 is the intended panel for a user? Actually, it's not easy to understand your question, maybe that's why still, at this time, no one would try attempt to answer your question, for they didn't get it. And what about this:

example.com/info/user/123/example.com

I couldn't get your question, please edit and explain it further more.

0

OK I got it.

Following is relevant:

The receiving domain should be able to: 1. Reside on a separate IP. This is crucial. 2. use $_SERVER['HTTP_HOST']; and display the content accordingly

Step by step guide:

  • You setup your receiving domain on your server ON A SEPARATE IP.
  • You setup a WildCard A entry and point it to the receiving domain.

On the domain that needs to be redirected you do: - Set the A entry to the SEPARATE IP of the RECEIVING DOMAIN.

On the PHP script OF the receiving domain you do following:

<?

     echo $_SERVER['HTTP_HOST'];
     echo "<br />";
     echo 'Ich trag pollunder und brille!';

?>

And you are good to go :)

Herr
  • 2,725
  • 3
  • 30
  • 36