DNS entry to redirect constant url to changing directory name

DNS entry to redirect constant url to changing directory name - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the DNS entry to redirect constant url to changing directory name error on your web browser. Problem :


I have static content that is regularly updated that I'd like to maintain 100% up-time for when switching over to new content.



Ideally I'd like to provide a single url such as:



static.mydomain.com/tiles/


that actually redirects to something like



static.mydomain.com/tiles-2016-03-01/


then when I roll-out a fresh update I can quickly update the DNS record to redirect to the new files



static.mydomain.com/tiles-2016-04-28/


Is this possible with DNS alone? Perhaps there's an alternative non-DNS solution I can use?



BTW I have numerous tile sets so would prefer to host them all under static.mydomain.com.



At present I deploy my new content to



static.mydomain.com/tiles-NEW


I then rename the existing "tiles" to "tiles-OLD", followed by renaming "tiles-NEW" to "tiles". Unfortunately this process takes a while due to the huge number of files held under each directory, so renaming via FTP or the web based control panel (my only options) results in a fair amount of downtime. As the site is popular at least some users are always going to experience issues during my renaming process.



Also using a quick DNS change would allow me to quickly roll back to an older version of my files if a problem was discovered with the update.



I'm using CloudFlare for my DNS if this has any relevance to potential solutions.



Alternative Solution



As this is outside the abilities of DNS I solved it using a simple web.config file on IIS (a .htaccess can be used instead on Apache):



<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="tiles">
<match url="^tiles/(.*)" />
<action type="Redirect" url="tiles-20160428/R:1" redirectType="Found" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

Solution :

No.



A DNS (domain name server) record can only associate Internet numbers and domain names in different ways, such as an A (IPv4) record, AAAA (IPv6) record, and MX (mail server, where to send email to). You cannot give instructions through DNS, such as a 301 or 302 Redirect response, which is what I believe you're asking for. You are going to need to use a web server and/or a content language like Go/PHP to accomplish what you have set out to do.


We hope that this article has helped you resolve the redirects, dns, cloudflare error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How do I redirect traffic only if being accessed from a specific port?

How to redirect to any domain [duplicate]