Direct Links to Non Homepage Page gets a 404

EDIT: I think i fixed it. I added the _redirects file to my angular.json in both assets arrays. The only reason i knew to do that is because I was looking through my other angular project and realized that I did not do that for this project. I fixed it and redeployed and it seems to be fixed. This really should be emphasized in the help article for others who are using angular.

Custom Domain:
Netlify Domain: lucid-volhard-7848bd
DNS: Namecheap
Setup: linked to my github; deploys every time I make a git push
_redirects file included in code files: YES
Multiple URLS affected: YES

Issue: I have successfully deployed an angular front end to netlify and connected a custom domain. Initially, loading the homepage of the site works fine, and i can navigate through the site with the navigation bar i coded. The problem is, when I send someone a direct link to a page that isn’t the home page ( it doesn’t work and netlify serves a nice 404 page not found error. However, if I go to the home page of the website and then navigate with the navigation bar to that same page that I was trying to access, it loads it just fine. The issue seems to be happening with all of my subpages.

Having previously deployed an angular frontend with Netlify, I have already included a _redirects file in this project in the same place as i did with that previous project(that doesn’t have this issue).

Hey @littlebitt95

When I visit directly, the page does load. It doesn’t, I don’t believe, load correctly though.

When navigating from the homepage to /calendly I see:

However when visiting the URL directly I see (after scrolling a little)

Additionally, the navigation pop-up (as shown in the first image) appears under the grey area

I have absolutely no experience developing with Angular so I cannot attempt to offer a solution, but hopefully this might provide some assistance.

Thank you @coelmay. I reached out to Calendly to give them this update. (I already had a ticket in with them about this exact issue when I run my site on localhost, and now it seems the issue has replicated itself to production :smiling_face_with_tear: :disappointed_relieved: ) I am using their inline embeded widget in my code so I don’t have a whole lot of options to debug this particular part of the issue myself. At least the page loads, even though it’s not quite what it’s meant to look like.

1 Like

sorry its so tricky @littlebitt95 - let us know if you make any progress or we can help in any way.

i’ll let the right folks know about the unclear setup instructions for angular :+1:

1 Like

Hey there, @littlebitt95 :wave:

Hope you’re doing well! Thank you again for surfacing this feedback last month. I wanted to follow up and let you know that our Documentation team has updates the docs to include adding _redirects file in angular.json. Feedback like yours helps us improve, so don’t hesitate to reach out in the future if you have a similar experience.


1 Like