diff --git a/frontend/src/app/[lang]/dashboard/apps/[id]/page.tsx b/frontend/src/app/[lang]/dashboard/apps/[id]/page.tsx
index e48befc..7d428ef 100644
--- a/frontend/src/app/[lang]/dashboard/apps/[id]/page.tsx
+++ b/frontend/src/app/[lang]/dashboard/apps/[id]/page.tsx
@@ -303,7 +303,9 @@ export default function AppDetailPage() {
}>({
queryKey: ['domain-info', appId],
queryFn: () => api.get(`/applications/${appId}/domain`).then((r) => r.data),
- enabled: showDomainSetup || (!!app && (app.customDomainStatus === 'pending_dns' || app.customDomainStatus === 'verified')),
+ // Always load: we surface the active app domain (platform host included) even
+ // when no custom domain is configured, so the platform host must be available.
+ enabled: !!app,
});
const { data: domainPriceData } = useQuery<{ monthlyPrice: number }>({
@@ -1045,6 +1047,18 @@ export default function AppDetailPage() {
const pageLocked = isAnyDeleting;
+ // The host the app is actually reachable on right now: the verified custom
+ // domain when present, otherwise the platform-assigned subdomain. Single source
+ // of truth so every place that shows "the app's domain" stays in sync.
+ const platformHost = `${app.subdomain}.${domainInfo?.platformDomain || 'apps.cloudhost.ir'}`;
+ const currentDomain =
+ app.customDomain && app.customDomainStatus === 'verified' ? app.customDomain : platformHost;
+
+ const copyDomain = (domain: string) => {
+ navigator.clipboard.writeText(domain);
+ notify.success(ad.copied);
+ };
+
return (
<>
{app.runtime}{app.runtimeVersion ? ` v${app.runtimeVersion}` : ''}{app.phpVersion ? ` — PHP ${app.phpVersion}` : ''} ·{' '} - {app.customDomain && app.customDomainStatus === 'verified' - ? {app.customDomain} - : {app.subdomain}.{domainInfo?.platformDomain || 'apps.cloudhost.ir'} - } + {currentDomain}
@@ -1604,16 +1615,24 @@ export default function AppDetailPage() { )} - {/* Platform domain (always shown) */} + {/* Application domain — the host the app is reachable on right now + (verified custom domain, else the platform subdomain). Click to copy. */}{ad.platformDomain}
-- {app.subdomain}.{domainInfo?.platformDomain || 'apps.cloudhost.ir'} -
+{ad.appDomain}
+{ad.customDomain}
-{app.customDomain}
+