To unify the complex URLs of different social media profiles I want to create forwardings/redirects from my own domain to the domain of the respective profile. For these alias domains I want to use a path structure instead of normal subdomains.

An example: Requests to subdomain.mywebsite.com/facebook should be forwarded to facebook.com/my.name.randomnumberblablabla.

For DNS redirections of course no paths can be specified, how do I configure redirections of URLs that contain paths? My domain is hosted at greenhost.nl and an Apache2 is used as webserver.

  • To clarify, by "forwardings/redirects" (and the reverse-proxy tag), are you wanting to mask/hide the real facebook.com URL from the user? Or do you want a simple redirect?
    – MrWhite
    Feb 24, 2020 at 21:37
  • @MrWhite I only want to set up simple redirects to build a uniform, easy to remember link structure for complex URLs.
    – max stern
    Feb 24, 2020 at 22:14

1 Answer 1


It looks like i could answer my question by myself. When the apache2 module mod_alias is enabled, adding these lines in /etc/apache2/virtualconf.conf does the job:

<VirtualHost *:80>
    ServerName subdomain.mywebsite.com
    Redirect permanent /facebook https://facebook.com/my.name.randomnumberblablabla

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.