How to host multiple websites with MAMP Pro and DynDNS

I've been trying to set up a system on my local machine that enables me to have multiple sites running as virtual hosts, each with it's own public URL so I can show clients etc before actually putting it on a remote server. The solution I soon realised would be MAMP Pro in conjunction with DynDNS.

However I couldn't quite work out how to set it up to work with multiple hosts. I got a domain in DynDNS pointing to my IP address but it would only show the default host set up in MAMP. I thought the wildcard subdomain on the DynDNS domain would correspond with the name of the host in MAMP. However, they all just showed the default host.

It turns out that you need to set up individual domain hosts in DynDNS and then use the full url of those in MAMP Pro as the name of the host (or just as an alias). For example, lets say you have two hosts in MAMP Pro, one called test and one called test1. In DynDNS you need to set up two hosts, you can call them whatever you like but lets say you choose (the second part can be one of several choices if you have a free account) and You will then need to add an alias to your hosts in MAMP Pro and call them and for your respective hosts.

That's it - simple once you know but I couldn't find this piece of info anywhere!

25 Jul 08

php hosting lamp mamp dyndns

Comments RSS

  1. Cool, thanks for the info! I am trying to do a similar thing, host my own site through DYNdns. Thanks again.

    7 Apr 09 21:36 axelator

  2. Hi Ben,

    How exactly does one add an alias to your host in MAMP. I dont have Pro.



    30 Jul 09 22:22 Nigel

  3. Thanks! Works like a charm and was exactly what I was looking for.

    31 Aug 09 17:30 Andy White

  4. This only redirects on my local box. Can you share your Mamp Pro settings?

    28 Oct 09 20:25 Scott

  5. Thanks so much for this info. I've used MAMP Pro for a couple years but only for internal dev. Using DynDNS is so much easier than updating all the /etc/hosts files of all our desktops and laptops.

    9 Dec 09 21:40 Shane Robinson

  6. Thank you for this. So simple!

    9 Jan 10 8:51 BFTQ

  7. I've been looking high and low for this!!!!! Life saver!!!!

    1 Mar 10 1:44 Steve

  8. Many thanks! Very useful, and indeed so simple. I searched the MAMP Manual FAQ for this, to no avail. Your recipe should really be added there!

    29 Apr 10 19:18 Eric Bolikowski

  9. Thanks for your help. The way I set mine up is my D-Link router serves as the client and it has my <mydomain> as the host so I can use it for more than just my iMac. Thus I use the wildcard solution and only have <mysite>.<mydomain> as the alias and only one site in the dyndns host entry using wildcards.

    Works a treat. It is a little long but it allows a bit more flexability without having to have dyndns clients going on each pc. I can just port forward stuff and the alias trick works fine for web hosting my client's sites during development.

    8 May 10 23:26 Mike Howell

  10. Thanks for the guide! (:

    However, I am having a problem with link URLs (running Modx Revolution 2.0 as the site core) ...

    For example using "site1.loc" with MAMP and "" with dyndns, using "" loads in site root/home alright ...

    But, for example a link "site1.loc/blog"doesn't directly resolves to "", but remains "site1.loc/blog" ...

    Interestingly if I type in ""by hand, the page loads in fine ...

    Any thoughts on how to fix the above so that site links load with a dyndns root and not with ones from MAMP Pro??

    25 Jul 10 21:27 Tom

  11. I'm going through this aspect at the moment. I've used locally for some time, but now want to show a couple of separate sites to people.

    I seem to be stumped on the last bit - How do you add an alias in MAMP Pro? What would it be called?

    I've tried <host>.<dyndnsdomain>, etc. as the server name.
    What have I missed here? :)

    11 Nov 10 16:47 JDub

  12. Aliases are added at the bottom right of the 'hosts' view. Just click the + icon and enter the domain.

    10 Dec 10 13:12 the author

  13. Thank you! It exactly that i need!

    27 Jul 11 12:07 Anton

  14. I have exactly the same problem as you describe but with Drupal 7. Any tutorials on that? I cant get it to work.

    12 Oct 11 13:56 Morgan