Websites and applications

Develop a website on a temporary URL and move it to the final domain

Reviewed on 3 min read desarrollo url temporal

A temporary URL lets you prepare a website before publishing it, but references to that domain can end up stored in content, settings and integrations. Plan how to change them before you consider the project finished.

Work with the final domain

You can test the final domain using the hosts file on your computer. It only affects the computers where you set it up: it does not change public DNS, validate ownership or automatically make certificates or external callbacks work.

This method reduces URL changes, but it does not remove the checks needed before going live. Use a domain you control for real connections and avoid sending email or payments from the test environment.

If you use another address

Protect the environment with authentication and keep it from being indexed. noindex does not protect private data. Use test email, payments and jobs, and check that the clone does not share a production database or integration.

Generate links using the application's own functions where possible. A reference such as /imagenes/logo.png is relative to the host root: it may break if you move the website to a subdirectory. Do not replace every full URL with root-relative paths without checking the context.

Switch to the final domain

  1. Check the destination's DNS, document root and certificate.
  2. Keep a restorable backup and control writes during the switch.
  3. Update the main URL as the application requires; in WordPress, follow this guide.
  4. Review references stored in content, templates and plugin tables. Use tools that handle serialised data and offer a dry run, as explained in content replacement.
  5. Update OAuth, webhooks, allowed origins, licences and jobs that include the previous address.
  6. Review the canonical URL, sitemap and redirects; remove the test restrictions only from the site being published.

Check the result

Open a private window and review the Network tab with the browser console. Look for requests to the temporary address, mixed content and unexpected redirects.

Test forms, the admin area, login, checkout and jobs, depending on the website. Purge the relevant caches; clearing cookies may log users out and does not, on its own, fix a wrong URL in the database.

If the temporary address received visits or links, keep it accessible or redirect it to the equivalent content where appropriate. If it was a private clone, remove it or keep it protected without duplicating production activity.

You may also find useful

Something wrong or out of date? Tell us and we will review it.