A record and need IP address

Hi,
domain: hemasblomster.dk
subdomain: hemasblomster.netlify.app

I gonna point my domain hemasblomster.dk to hemasblomster.netflify.app from one.com. My site is created in React and was told by one.com to create an A record. Where can I find the IP address?

A CNAME didn’t work because the URL hemasblomster.netlify.app/kontakt didnt’t change to hemasblomster.dk/kontakt when clicking on the contact-page

And when I used netlifys nameserver, my form on the contactform didnt work and sent me to 404 page after submitting the form. Tried to add a MX record from netlify to one.com but still got the 404. One.com says I need to use their nameservers if I want the contact form to work

So, an A record is the solution for my issue

Hi @rcilomba,

Thanks for reaching out and welcome to Netlify’s Support Forums!

You can follow our External DNS configure mentioned here:

That’s section one:

Type Name Value
A @ 75.2.60.5
CNAME www mysite.netlify.app

You should point the A Record for hemasblomster.dk to 75.2.60.5 and for www.hemasblomster.dk you would create a CNAME Record that points to hemasblomster.netlify.app.

Hi Melvin,

The A record and the CNAME works fine now for the root hemasblomster.dk but now I can’t reach my subdomain hemasblomster.dk/webshop

I still need the A record and the CNAME to point to my netlify sub domoain. How can I fix this issue?

The 404 on hemasblomster.dk/webshop is not a DNS issue, but rather a routing issue on your end. You’ll need to make sure that page exists and is accessible when browsing.

1 Like

Thanks for the answer, but it stopped working when I removed the domain in Domain management, it worked before. So I was thinking if it has to do with the settings for the domain her in netlify

Hi @rcilomba,

Could you clarify what you mean when you said it stopped working when you removed the domain in Domain management? I ask because I do see that the domain hemasblomster.dk is assigned here:

The domain hemasblomster.dk is resolving properly. So is hemasblomster.dk/webshop, however as you mentioned the page is 404 and as Sid mentioned you’ll need to ensure that the page exists and is accessible.

Hi,

After adding A record and CNAME, my sub domain hemasblomster.dk/webshop worked, but now it gives a 404 page that I have coded

how can I make sure that I can point my domain to my netlify app and still have my subdomain /webshop to work?

/webshop is not a subdomain, it is a path on a domain. Check out Domains, subdomains and paths – the difference explained | Help Center | Landingi for more details on this.

The reason a 404 is returned is there is no content to serve on this path.

I see an A record

$ dig hemasblomster.dk
hemasblomster.dk.	3600	IN	A	75.2.60.5

however there is no CNAME on the www subdomain. There is an A record

$ dig www.hemasblomster.dk
www.hemasblomster.dk.	3600	IN	A	46.30.215.23

which belongs to one.com

$ dig -x 46.30.215.23
23.215.30.46.in-addr.arpa. 3600	IN	PTR	webcluster1.webpod15-cph3.one.com.

as well as an AAAA record

$ dig www.hemasblomster.dk AAAA
www.hemasblomster.dk.	3600	IN	AAAA	2a02:2350:5:10e:b9:238:fbdc:ac7

You will need to remove these and configure the CNAME correctly as per the support-guide previously shared by @Melvin.

Hi,

I have added the A record and the CNAME but can’t access my webshop on hemasblomster.dk/webshop

How can I do that?

Best regards
Ramadan

Yahoo Mail: Søg, organiser, behersk

Where is the webshop hosted @rcilomba?

If it is not part of the site deployed to Netlify, have you created a proxy for it?

I am using prestashop for the webshop, but the domain hemasblomster.dk is hosted at one.com

Yahoo Mail: Søg, organiser, behersk

No, hemasblomster.dk is hosted on Netlify and uses One for DNS.

If the store is hosted elsewhere and you want to access it via hemasblomster.dk/webshop then as I mentioned earlier you’ll need to configure a proxy to that site. This will only work if the store is configured to run on that path though.

Hi,

I sorry btut I am not sure how to configure the proxy to that site.

@rcilomba Have you read the documentation that @dig has linked to twice?

It’s here:
https://docs.netlify.com/routing/redirects/rewrites-proxies/#proxy-to-another-service

Yes I have seen it twice, but like I said. I am still not sure how to… The dns settings at one.com are correct and are working but there’s a conflict between the webshop. They told me to rename the webshop on the external server, which is at netflify. I am not sure how I can do that and need som help.

What is the domain the webshop is running on? If it is running on hemasblomster.dk then that is the issue as it is now served by Netlify and not One.

You will probably need to change the set up had and have in order for it to work. However no one here can tell you what you need to do as you have not give sufficient details about the setup you had/have (despite repeatedly asking) in order to provide informed advice.

I have added the proxy for the webshop and it still does not work, is there something I am missing from my end?

Yes I have seen it twice, but like I said. I am still not sure how to… The dns settings at one.com are correct and are working but there’s a conflict between the webshop. They told me to rename the webshop on the external server, which is at netflify. I am not sure how I can do that and need som help.

Hi, @rcilomba. Imagine I said to you:

How do I make that thing go there?

Would you know how to answer me? Do you know what thing I am talking about? Do you know where “there” is?

In the same way my question above doesn’t have enough detail for you do answer, your own questions here don’t have enough detail for anyone here to answer you. I could be talking about getting a horse to walk up a steep hill. I could be talking about trying to plug an electrical cord into a power outlet. I could be talking about throwing a dart at a dartboard. However, there isn’t enough information in my question to tell which which (if any) of those things I am actually talking about.

Now, your questions are more detailed than my example above. However, the fact remains, we just don’t have enough information about your question to be able to give you an answer. That said, I’ll still try.

I did take a look at your _redirects file for this site and I do see an issue there:

/* /index.html 200

/webshop/*  https://hemasblomster.dk/webshop/:splat  200

There are two issue with that above.

First, the first redirect rule is going to match the path /webshop/ as well. That means the first rule will always match first and only the first matching rule is used. So, the first thing to change is moving the /* /index.html 200 rule to the end.

That said, the proxy rule itself (quoted below) is wrong:

/webshop/*  https://hemasblomster.dk/webshop/:splat  200

That rule just point the website back at itself. This would cause an infinitely loop so it will always be ignored.

My best guess (which is a guess because you haven’t provided this information) is that you want the subdirectory (sub-directory not sub-domain) /webshop/ to point to some other website that is not hosted at Netlify.

As I don’t know where the other site is, let’s just pretend it is hosted at webshop.example.com. If so, your _redirects file should look like this:

/webshop/*  https://webshop.example.com/:splat  200
/* /index.html 200

That says when someone wants to view the path /webshop/ at Netlify (or one of its subdirectories), then proxy those requests to the site at webshop.example.com.

If all my guesses are correct (which they may not be but if) then you can replace webshop.example.com with the actual domain for where the webshop is hosted in those redirects above, redeploy, and then (hopefully) the issue will be fixed.

If that doesn’t fix it, please let us know some more details and we’ll be here to continue troubleshooting this.

1 Like

Thanks for helping me troubleshooting, because I honestly feel stuck and lost. I have been troubleshooting for a long time and this is why I reached out to you guys for help. My _redirects file, I thought I did it correctly when creating a proxy, but apparently not.

/webshop/* https://webshop.hemasblomster.dk/:splat 200
/* /index.html 200

I have changed the _redirects file to the content above but can’t access https://hemasblomster.dk/webshop/ at all. I am getting the ERR_TOO_MANY_REDIRECTS The webshop is created with prestashop.
The only problem I have is to reach to the webshop.

Do I also have to edit the domain management in the control panel in Netlify or is it only the _redirects file that needs to get edited?

| luke Support Engineer
March 12 |

  • | - |

Hi, @rcilomba. Imagine I said to you:

How do I make that thing go there?

Would you know how to answer me? Do you know what thing I am talking about? Do you know where “there” is?

In the same way my question above doesn’t have enough detail for you do answer, your own questions here don’t have enough detail for anyone here to answer you. I could be talking about getting a horse to walk up a steep hill. I could be talking about trying to plug an electrical cord into a power outlet. I could be talking about throwing a dart at a dartboard. However, there isn’t enough information in my question to tell which which (if any) of those things I am actually talking about.

Now, your questions are more detailed than my example above. However, the fact remains, we just don’t have enough information about your question to be able to give you an answer. That said, I’ll still try.

I did take a look at your _redirects file for this site and I do see an issue there:

/* /index.html 200

/webshop/*  https://hemasblomster.dk/webshop/:splat  200

There are two issue with that above.

First, the first redirect rule is going to match the path /webshop/ as well. That means the first rule will always match first and only the first matching rule is used. So, the first thing to change is moving the /* /index.html 200 rule to the end.

That said, the proxy rule itself (quoted below) is wrong:

/webshop/*  https://hemasblomster.dk/webshop/:splat  200

That rule just point the website back at itself. This would cause an infinitely loop so it will always be ignored.

My best guess (which is a guess because you haven’t provided this information) is that you want the subdirectory (sub-directory not sub-domain) /webshop/ to point to some other website that is not hosted at Netlify.

As I don’t know where the other site is, let’s just pretend it is hosted at webshop.example.com. If so, your _redirects file should look like this:

/webshop/*  https://webshop.example.com/:splat  200
/* /index.html 200

That says when someone wants to view the path /webshop/ at Netlify (or one of its subdirectories), then proxy those requests to the site at webshop.example.com.

If all my guesses are correct (which they may not be but if) then you can replace webshop.example.com with the actual domain for where the webshop is hosted in those redirects above, redeploy, and then (hopefully) the issue will be fixed.

If that doesn’t fix it, please let us know some more details and we’ll be here to continue troubleshooting this.

The ERR_TOO_MANY_REDIRECTS error is happening because the site you proxy to is sending a 302 redirect back to https://hemasblomster.dk/webshop/.

You can see this behavior if you make a request to the proxy target site as shown below:

$ curl --compressed -svo /dev/null --stderr - https://webshop.hemasblomster.dk/  | egrep '^(<|>)'
> GET / HTTP/2
> Host: webshop.hemasblomster.dk
> User-Agent: curl/8.4.0
> Accept: */*
> Accept-Encoding: deflate, gzip
>
< HTTP/2 302
< date: Tue, 12 Mar 2024 23:43:02 GMT
< server: Apache
< x-powered-by: PHP/8.2.16
< location: https://hemasblomster.dk/webshop/
< cache-control: no-cache
< content-length: 0
< content-type: text/html; charset=utf-8
< x-onecom-cluster-name:
< x-varnish: 12785253281
< age: 0
< via: 1.1 webcache1 (Varnish/trunk)
<

You will need to get the site you proxy to to stop sending that 302 and to send a 200 response instead to fix the ERR_TOO_MANY_REDIRECTS error.