Next.js Discord

Discord Forum

how can i add dns records in vercel?

Answered
American Robin posted this in #help-forum
Open in Discord
Avatar
American RobinOP
i dont know how this workls
Answered by Mozzy
Like this then
Image
View full answer

55 Replies

Avatar
American RobinOP
im using clerk
and have to add those dns records
Avatar
American RobinOP
i cant add those
i get a 404 error when i click here
Image
Avatar
Avatar
American RobinOP
oh it worked there
oke i see
i have to add now all there right?
Avatar
You'll need to add the records that Clerk specify
Avatar
American RobinOP
the CNAME would be: for example, clerk.mydomain.com
and then frontend-api.clerk.services
Avatar
Never used Clerk. What does it say?
Avatar
American RobinOP
Image
or just clerk
Avatar
Like this then
Image
Answer
Avatar
American RobinOP
ah oke thanks
it says i have to wait 24 hours
Avatar
Usually much shorter
Avatar
American RobinOP
the domain i added is only the name right
not like www.domainname.com
just domainname.com
only used the dev clerk so far, first time prod
oh
its active now
that was fast
Image
Avatar
nice
Avatar
American RobinOP
thanks alot!
Avatar
No worries
Avatar
American RobinOP
quick question, can i fetch data from my api, in a layout? @Mozzy
Avatar
You should be able to yes
I would make that a separate component though
Avatar
American RobinOP
import { NextRequest, NextResponse } from "next/server";

export async function GET(req: NextRequest) {
  return NextResponse.json({
    message: "Hello World",
  });
}
  const response = await axios.get("api/language");
  console.log(response);
ah wait
nah still not workin
changed to /api/language
Avatar
Needs the https://[...]
Avatar
American RobinOP
oh
uhm its currenntly
only localhost
?
Avatar
Should be
Avatar
American RobinOP
if i try it like this
its loading and loading nothing happens
any idea why?
Avatar
Add some console.log()s to see what is happening
Avatar
American RobinOP
Image
ok smth weird is happening
Image
Avatar
Please create another thread for this
Avatar
American RobinOP
oke
Avatar
(Also mark whatever message solved your original problem as the solution)