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.
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.
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.