The domain registrant is Afrihost who supplies me with an old-school apache server which stores all my images and documents for my website, which is simply a next vercel app.
I tried setting the domain, the issue is that when the DNS is set on my apache server I cannot access the images and documents due to their requests being redirected to vercel.
Currently the redirection is happening at the server level, via an htaccess file which specifies what to do for URL requests vs data requests, and this works fine.
My question is whether or not this is viable, and whether or not I should implement the DNS redirection and find another way to serve my images/data.
Extra:
A workaround would be to implement another DNS for something like data.pleyland.co.za, and then access the images through that URL, but that means changing all of the references on my entire website.
A second workaround would simply be to package everything in my vercel repo, images and all. This is probably the best approach, the only reason I have it set up like this currently is because I started out using the apache server. It does have the benefit of being able to change data without pushing an entirely new version of the website, but I could do the same thing with google cloud storage or something like that.
The apache server is just a kind of familiar environment for me to work in.
Hi @pleyland. You already considered the two options I would have suggested.
You could use a subdomain for the images and documents, or you could move all of them to Vercel instead of your other server.
If you go with a new subdomain on your apache server then there’s sort of a third option. Assuming the images are all in the same directory, something like /images/**/* , then you may be able to implement a rewrite or redirect to load the files without needing to update all references in your website.
At the moment the website is working, so my main question was if the current setup is at all viable, as if it’s not broke I don’t see the point of fixing it, at least not straight away. To put the question another way, it is essential to fill out the domain section of the setting menu?
I like the idea of the subdomain, and thanks for the extra information of rewrites, it’s just that when I make changes to the DNS it can take up to 48 hours to take effect, so I need to be very accurate with my edits unless I want the website to be down for a whole day.
By subdomain do you mean something like"data.pleyland.co.za", and then the entry will be an A-type, with the IP address that is the same as the IP address used for the current apache server?
If you’re trying to add a custom domain to your project, you would need to add it in Project Settings. If your current setup is working the way you want, then I wouldn’t say there’s any reason to change it. If it was not working then I would recommend one of the proposed alternatives.