Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vercel部署名称太长 ( vercel deployment name is too long ) #74

Closed
Haoqi7 opened this issue Apr 28, 2022 · 2 comments
Closed

vercel部署名称太长 ( vercel deployment name is too long ) #74

Haoqi7 opened this issue Apr 28, 2022 · 2 comments
Labels
good first issue Good for newcomers

Comments

@uiuxarghya uiuxarghya changed the title vercel部署名称太长 vercel部署名称太长 ( vercel deployment name is too long ) Apr 28, 2022
@uiuxarghya uiuxarghya pinned this issue Apr 28, 2022
@uiuxarghya uiuxarghya added the good first issue Good for newcomers label Apr 28, 2022
@uiuxarghya
Copy link
Owner

uiuxarghya commented Apr 28, 2022

请问,我的域名是https://sor.vercel.app/,https://www.freecodecamp.org/news/how-to-deploy-react-apps-to-production/用短链接后是sor-hjgb2o1bb-ha0.vercel.app/r/626a94b098a177000920b0e0。怎么把前面(sor-hjgb2o1bb-ha0.vercel.app)那一串改成域名(sor.vercel.app)呢,前面那一串是vercel的部署名称

Your Issue translated to English

Excuse me, my domain name is https://sor.vercel.app/, https://www.freecodecamp.org/news/how-to-deploy-react-apps-to-production/ is sor- hjgb2o1bb-ha0.vercel.app/r/626a94b098a177000920b0e0.

How to change the string in front (sor-hjgb2o1bb-ha0.vercel.app) to the domain name (sor.vercel.app), the string in front is the deployment name of vercel

The Solution

Step 1.

The solution is acutally to add an Environment Variable in that project in Vercel

NEXT_PUBLIC_VERCEL_URL="https://your-sepecific-domain.com"

In your case it would be

NEXT_PUBLIC_VERCEL_URL="https://sor.vercel.app"

Step 2.

Redeploy the vercel project after adding the environment variable.

Step 3.

And Ta-da its done.✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants