Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it possible in flutter web to add prefix to the domain?

I am new in flutter web development and I need little help from you people. I am building an app in flutter web and in the domain of that app I want to add the prefix for example:

(shop.)localhost.com

or

(user123341.)localhost.com.

If you people have any small information about this please share your information. It will really appreciated.

like image 589
Muhammad Ibrahim Avatar asked Nov 25 '25 19:11

Muhammad Ibrahim


1 Answers

Yes it is completely possible to upload a Flutter Web App to a subdomain as Flutter compiles to Javascript and HTML. You can upload it to any subdomain you wish. But in your case you want to do that using localhost.

You need to understand that localhost is not purely a domain and you can't add a subdomain to it. But there are some workarounds to do that:

Based on this answer, you can try adding subdomains to the localhost as illustrated below.

 C:\Windows\System32\drivers\etc\hosts

And append lines like the following to it:

127.0.0.1    example.com
127.0.0.1    subdomain.example.com
like image 172
Shubhamhackz Avatar answered Nov 27 '25 08:11

Shubhamhackz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!