DNS config for my domain + redirect www

Hello,

I would like to change my DNS config, so my domain will go to my YNH server instead of my OVH hosting. My OVH hosting close today so I’m a little bit late and stressed :cold_sweat:.

I’ve read the doc about DNS config and did my best, but for my case I just would like to have a feedback to know if I’m correct.

  • My registrar is OVH

  • I would like to still be able to use my email with OVH

  • I have a working wordpress in my YNH server, pointing directly in my domain (edifice-edition.com)

  • I can’t edit this line www IN A 0.0.0.0 (old ipv4 adress) with my ipv4 YNH server, I get this error, should I delete it?
    23

Here is my DNS config, should I add or remove something?
Thanks a lot! :grinning:

$TTL 3600
@	IN SOA dns111.ovh.net. tech.ovh.net. (2019042402 86400 3600 3600000 300)
                          IN NS     ns111.ovh.net.
                          IN NS     dns111.ovh.net.
                          IN MX 1   mx1.mail.ovh.net.
                          IN MX 100 mx3.mail.ovh.net.
                          IN MX 5   mx2.mail.ovh.net.
                          IN A      x.x.x.x (my IPV4 yunohost server)
                          IN TXT    "1|www.edifice-edition.com"
                      600 IN TXT    "v=spf1 include:mx.ovh.com ~all"
_autodiscover._tcp        IN SRV    0 0 443 mailconfig.ovh.net.
_imaps._tcp               IN SRV    0 0 993 ssl0.ovh.net.
_submission._tcp          IN SRV    0 0 465 ssl0.ovh.net.
_xmpp-client._tcp         IN SRV    0 5 5222 edifice-edition.com. (I have put it myself)
_xmpp-client._tcp         IN SRV    0 5 5269 edifice-edition.com. (I have put it myself)
autoconfig                IN CNAME  mailconfig.ovh.net.
autodiscover              IN CNAME  mailconfig.ovh.net.
ftp                       IN CNAME  edifice-edition.com.
imap                      IN CNAME  ssl0.ovh.net.
mail                      IN CNAME  ssl0.ovh.net.
ovhcontrol                IN TXT    "X6LK+Z7sE3FuzRy14AjFTQ"
pop3                      IN CNAME  ssl0.ovh.net.
smtp                      IN CNAME  ssl0.ovh.net.
www                       IN MX 1   mx1.mail.ovh.net.
www                       IN MX 100 mx3.mail.ovh.net.
www                       IN MX 5   mx2.mail.ovh.net.
www                       IN A      x.x.x.x (old ipv4 adress) (Can't edit it, should I delete it?)
www                       IN TXT    "l|fr"
www                       IN TXT    "3|welcome"

Uuuhyea that’s weird because I can’t find which CNAME records it’s talking about which is apparently “conflicting” …

So yea, you can still try to delete the www A record … Its only use is that if you go to www.yourdomain.tld, you should end up on your server (tho in fact you need to add the www.yourdomain.tld in yunohost’s domains, even tho you already have yourdomain.tld configured …)

1 Like

Thanks @Aleks.
Well it seems to works, my domain in poiting to my YNH.
But it seems to have broke a lot of image links, and my admin area is not accessible anymore. :cold_sweat:
I’m gonna check this out…

Hey @Aleks

I still have a problem with my www config… :sweat_smile:

  • I have my yourdomain.tld on my YNH config, and it is the default domain for my YNH wordpress site, all is good.
  • As you told me I’ve add www.yourdomain.tld on my YNH as well, with a certificat. But it’s pointing to my server directly, not to my WP site.
  • I’m not sure what I have to do so the www goes to my WP site.
    Here is my DNS config on my domain:
$TTL 3600
@	IN SOA dns111.ovh.net. tech.ovh.net. (2019051700 86400 3600 3600000 300)
                          IN NS     dns111.ovh.net.
                          IN NS     ns111.ovh.net.
                          IN MX 1   mx1.mail.ovh.net.
                          IN MX 100 mx3.mail.ovh.net.
                          IN MX 5   mx2.mail.ovh.net.
                          IN A      5.135.181.49
                          IN TXT    "1|www.edifice-edition.com"
                      600 IN TXT    "v=spf1 include:mx.ovh.com ~all"
_autodiscover._tcp        IN SRV    0 0 443 mailconfig.ovh.net.
_imaps._tcp               IN SRV    0 0 993 ssl0.ovh.net.
_submission._tcp          IN SRV    0 0 465 ssl0.ovh.net.
_xmpp-client._tcp         IN SRV    0 5 5222 edifice-edition.com.
_xmpp-client._tcp         IN SRV    0 5 5269 edifice-edition.com.
autoconfig                IN CNAME  mailconfig.ovh.net.
autodiscover              IN CNAME  mailconfig.ovh.net.
ftp                       IN CNAME  edifice-edition.com.
imap                      IN CNAME  ssl0.ovh.net.
mail                      IN CNAME  ssl0.ovh.net.
ovhcontrol                IN TXT    "X6LK+Z7sE3FuzRy14AjFTQ"
pop3                      IN CNAME  ssl0.ovh.net.
smtp                      IN CNAME  ssl0.ovh.net.
www                       IN MX 1   mx1.mail.ovh.net.
www                       IN MX 100 mx3.mail.ovh.net.
www                       IN MX 5   mx2.mail.ovh.net.
www                       IN A      5.135.181.49
www                       IN TXT    "l|fr"
www                       IN TXT    "3|welcome"

It’s probably very simple but don’t understand this…
Thanks a lot!

So if I understand correctly, you would like people that go to www.domain.tld to be redirected to domain.tld/blog ? Of would you like your blog to be directly on www.domain.tld ?

Trying to be clear:

  • My YNH server has is on a personnal domainA.tld
  • My blog is hosted in YNH, its adress is domainB.tld
  • I would like www.domainB.tld to go to domainB.tld

Thanks very much

Then using the redirect app (https://github.com/YunoHost-Apps/redirect_ynh) you should be able to setup a redirection (type 302 public) from www.domainB.tld to domainB.tld

2 Likes

Great it works thanks a lot @Aleks.

1 Like