Stupid doubt: Raspberry Pi with YunoHost for 2 different purposes with different DNS?

I am very new to all of these and I’d like to know that everything I’m doing is alright.

Context: I have a Raspberry Pi 3b+ for personal stuff that I bought a few weeks ago. One of the things I want is my own personal server with Nextcloud, email, etc. But there’s also this: I’m starting a business with two friends so we want to use my Raspi as a server if possible.

One of my friends bought a DNS with Square Space and we want to use it (we can call it domain1.com). As far as I read here, I need a static IP for my Raspi to be associated with the DNS, but I only want to use this DNS with one WordPress website (so domain1.com loads this WordPress) to be built on the Raspi and leave the free domain that YunoHost provides (domain2.nohost.me)for personal purposes.

Is it even possible? if so, anything I should know before I start with all of this?


PS: thank you so much for helping me with my problems :sweat_smile:

It’s possible, you should point domain1.com to your yunohost using a CNAME to domain2.nohost.me (since yunohost updates nohost.me IP every 5 minutes this always point to the right IP)

  1. Add domain2.nohost.me to Yunohost (if it’s not already done)
  2. Add domain1.com to Yunohost
  3. Go into Domains > domain1.com > DNS configuration and look at recommended DNS configuration
  4. Install the DNS configuration into DNS zone of domain1.com (using provider’s panel) replacing all A records pointing to your IP by CNAME records pointing to domain2.nohost.me

What’s a CNAME ? It’s a record which will, everytime somebody connects on your domain will say to the browser “This website have the same IP as domain2.nohost.me” and the browser will fetch the IP from domain2. So the IP is always up to date.

Careful : Diagnosis function of Yunohost check recommended configuration, it will throw errors if it detects CNAME instead of A. But this works, that’s what I’ve done for times. You can safely ignore diagnosis warnings.

Another precision : CNAME is just about IP, it won’t redirect you to domain2, the browser will just fetch the IP from domain2 then use it to connect to domain1.

1 Like

Thank you for your response and sorry for the delay in replying to you, but I have this issue with the IP: the DNS configuration starts with:

; Basic ipv4/ipv6 records
@ 3600 IN A 212.225.ABC.XY

Where ABC and XY are numbers too, but the 212… IP doesn’t seem to work (and Square Space doesn’t seem to recognize it either). Maybe I’m doing something wrong.

This could work for www.DOMAIN.TLD (or any subdomains) but won’t with DOMAIN.TLD . You could not use CNAME record on main domain…

What would you mean by “doesn’t seem to work” ?

If I try to open this on my web browser it doesn’t load anything (cannot connect) and if I add it to the DNS configuration:
rect837
I get this error:
Screenshot_20210405_212732

Your screenshot of the DNS settings is tiny, can you make a bigger one of all the configurations?

I tried to share a video and edit it with Kdenlive but seems like I sucks at this too lol

here I can modify if I want the domain with or without “www” but that’s it.

EDIT: cc/ @Jules-Bertholet

It seems like you are creating multiple A records for your domain root, pointing to different IPs. That won’t work. You can have separate A records for domain.tld and sub.domain.tld, but not two for domain.tld. From your first post it appears what you want is to use the YunoHost DDNS service to update the IP of domain2.nohost.me, and to use a CNAME record to point domain1.com to that same domain. In this case you don’t need any A records for domain1.com, only 2 CNAMEs: @ domain2.nohost.me. and * domain2.nohost.me. .

I guess you are referring to the third image “website default”, right?

I see, would you mind helping me do it?

Make one record, host @, record CNAME, data domain2.nohost.me.
Make a second record, host *, record CNAME, data domain2.nohost.me.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.