
So I just need to add a web platform with the desired domain even though the apps won't be supported on the web. Thanks, I'll try it out.

We must be talking about different things, I mean the Custom Domain from Settings, not the platform

Right. Custom domain isn't related to this problem

@Ernest you want an email verification to come from https//appwrite.app1.tld
and from https//appwrite.app2.tld
?
Looks like you might need separate appwrite cloud instances

That's what I wanted clarification on. And I think @Steven answered it somewhat. I think it would be helpful to have different urls for email verification for different projects.

Having multiple appwrite instances just so I can tailor the email verification url for different projects is not ideal

I see your point, with one Appwrite instance we are able to host multiple projects ,but doesn't each project have the ability to use a different custom domain and a different hostname? I think they do

What do you mean different urls?

What do you mean? Emails don't come from a url š§

For the flutter sdk to create an email confirmation this is how it's documented:
Future result = account.createVerification(
url: 'https://example.com',
);

The method requires a url and I want to pass different urls to that method for apps in different projects

But for now it requires that the url domain be either localhost
or domain.set.in.env

So say I have two projects (fitness app project & ride hailing app project). I want to be able to pass as an example:
Fitness app
Future result = account.createVerification(
url: 'https:// fitness.app',
);
and for ride hailing app
Future result = account.createVerification(
url: 'https:// awesomeride.com',
);
That's basically all I want to do

Also, when a verification email is sent; the userID and token for verification are appended to the passed in url and sent to the user's inbox. I don't want users' of both apps seeing the verification url as https://domain.set.in.env? userId=xxxx&token=yyyyyyyy

@Steven I know the thread is getting long but if you could provide any insight or clarification that'll be super helpful.

@Ernest the domain that your app is sitting on is the one that goes into createVerification(), so if you put in a custom domain in your Appwrite project, say https://fitness.app (you have to have access to https://fitness.app) then you can make your verification endpoint to be https://fitness.app/verify.
Obviously the /verify
route should be one that exists in your app and can handle your incoming verification request.

Tried that; didn't work. Got an error saying to use either localhost
or domain.set.in.env
. Maybe I'm doing something wrong though

I'm using cloud Appwrite for now, I guess the Appwrite team will advise better on the .env thing. For me I setup the host in the projects "Platforms" settings, under update hostname. That worked for me

It might be confusing when you say custom domain because that's something else in the Appwrite Console.

Right, so you'll need to add web platforms for those hostnames

The url in the email will be whatever url you out when you call the create verification method.

Hence the confusion, I thought custom domains were the way to go since it allows the appwrite instance to be accessed using the custom domain set.

Great thanks for clearing that up. I'll be trying it later. Thanks @Steven @Chola

[Solved]Can't use custom domain for email verification url

[Solved] Can't use custom domain for email verification url
Recommended threads
- CRUD Operations don't work
Hey all, Create, update, and delete is not working for the Appwrite database. The database seems down. When will it be solved? As I can see from the other suppo...
- Flutter OAuth2 Google does not return to...
When the flow starts, the browser opens, I select an account, and it keeps showing: """ Page not found The page you're looking for doesn't exist. `general_rout...
- Appwrite REST API Docs in LLM-Friendly F...
Is there a version of the Appwrite REST API documentation available in a format suitable for LLM vector embedding? Specifically, Iām referring to the following ...
