"Another site is already using this domain" error; cannot delete old site or old domain to rectify

There are many topics with this error message. I read them all, and I believe my use case is unique enough to warrant creating a new one. Thanks!

“Another site is already using this domain” error trying to set custom domain “v1.kylegach.com” on site “kylegach”

Both sites and domains are mine. “v1-kylegach” is my old site. It fails builds and I don’t want to mess with fixing it, so I used the drag-and-drop, manual deploy feature to publish one final update.

Because of the need to manual deploy, I couldn’t use branch subdomains to differentiate between the old and new site. (At least, I think my understanding there is correct.) Instead, I made an entirely new site (attached to a new repo), “kylegach”.

Now I wish to redirect some paths from the new site to the old (to prevent link rot). I finally discovered (it’s not terribly obvious) that you can only redirect among domains associated with the site, so I tried to add the old site’s domain, “v1.kylegach.com”, as a domain alias to the new site, “kylegach”. Doing so threw the error above.

Is there a path forward here?

Thanks,

Kyle

Hey Kyle,
Thanks for reading through the other posts about this error- it’s true, there are ~1 million ways to stumble across it.

Am I understanding correctly that you have these two sites?

  1. Netlify URL: kylegach (new)
    Custom domain: kylegach.com

  2. Netlify URL: v1-kylegach (old)
    Custom domain: v1.kylegach.com

If that’s right, I would assume that a _redirects like this on your new site would work:

/writing/*   https://v1-kylegach.netlify.com/writing/:splat   200!

Modeling off of this:

Is that not the case? Can you share what redirects you’ve tried so far?

Thank you for the quick response, Jen.

Here are the redirects I attempted, located in netlify.toml:

[[redirects]]
  from = "/colophon/"
  to = "https://v1.kylegach.com/colophon/"
  status = 307

[[redirects]]
  from = "/resume/"
  to = "https://v1.kylegach.com/resume/"
  status = 307

[[redirects]]
  from = "/work/"
  to = "https://v1.kylegach.com/work/"
  status = 307

[[redirects]]
  from = "/work/*"
  to = "https://v1.kylegach.com/work/:splat"
  status = 301

I also tried the equivalent in _redirects, with similar results.

I noticed your example redirects to v1-kylegach.netlify.com rather than v1.kylegach.com. Will that somehow also redirect to the latter?

Hey @kylegach,

Our bad – Netlify doesn’t support 307 redirects! Hit these with a 301 and you should have a little more luck.

Failing that, you may wish to remove the trailing slashes from your redirects. These too can be problematic.

Please, let me know if this helps!

Thank you, Scott. I opted to continue using HTML redirects for the 307 cases, and when I removed those so that the only redirect in the file was a 301, it worked.

I couldn’t find anything about the supported http response codes in your docs, just this page: Redirects and rewrites | Netlify Docs. Seems like that should be included there…

(Sorry for the delayed response, btw. I was in the middle of other work that prevented me from easily publishing a change.)

Hey @kylegach, glad to hear it’s working and thank you for the feedback! We’ve taken it on board and we’ll close the loop if we look to support 303/307s in the future.