2

I am currently running one website where I host multiple "projects". One of these projects is now basically finished and I want to run this project on it's own domain.

I am running my main website on my own Synology server and I own a domain name for that site. I now want to buy a seperate domain for my new (finished) project. Since I only have one server at home I want to host both websites on that server. I had the following (probably terrible but I'm not sure) idea:

I put my finished project in its own seperate folder (with it's own index.php etc.) and I will link my newly bought domain name to my server. Then I check on my root index.php whether the user typed in "www.mainwebsite.com" in which case nothing happens, or if the user typed "www.seperateproject.com" I will redirect them to "finishedproject/index.php".

I am very certain that there are flaws in this system but It's the first (and easiest) thing that came to my mind. How will this e.g. influence my SEO?

I'm looking forward to hearing your opinions and if something is unclear, please let me know :)

1 Answer 1

1

To host multiple websites with multiple domain names on the same server you can use "virtual hosts." That is a feature where the web server looks at the domain name of the request, and chooses which directory contains the correct files based on that domain name.

Synology server supports the virtual host feature: https://kb.synology.com/en-in/DSM/help/WebStation/application_webserv_virtualhost

You would need to point the new domain to your server using A records.

When you implement virtual hosting, each website is available directly on its own domain name. That type of setup is better for both SEO and usabality compared to redirecting requests to a central domain.

1
  • Thank you kindly! I have now set up virtual hosts and it seems to work nicely.
    – Caseus
    Commented Apr 11, 2022 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.