Landing page second domain

Hi there,
I,ve got my site running with Kirby on one domain.

Now, I’ve got a second domain. Is i possible to send. Users of that domain always to one landing page?

I also have some domains on my web server, which redirect to one “central” domain. I use the following technique:

I have a separate document root for each domain.
In one of them is the central site at one domain.
In the others, which should redirect to the central site is a simple php-file:

header("Status: 301 Moved Permanently"); // optional

which redirects everything to the central domain.

But i think, this does only redirect if users access the domain without any directory chosen. gets redirected but not Correct me if i´m wrong.

1 Like

Why not just change the DNS settings of your second domain and do a 301 forwarding?

For now I solved it in the webserver configuration.
I don’t like redirecting in DNS. That is not where DNS is for and supposed to do.

Later on maybe I will look for a nice solution.

I was talking about URL forwarding in the DNS settings part of the domain name registrar level. But maybe you would like to explain what is bad about it?

There is no such thing in DNS for redirecting domainnames to another URL.

Is an ISP is offering that, than it is a combination of a DNS record with a redirect configuration on a webserver of the ISP. Most of the time running on one server and becouse of the load not the fastest solution.

If it is working for you, then it is OK! But I prefere to do it on my own webserver with My own configuration.