From dcfb172704f3afb68a30425029ec834be2883274 Mon Sep 17 00:00:00 2001 From: bt Date: Sat, 8 Jun 2024 13:22:19 -0400 Subject: More content porting, on-going markdown changes for lowdown support --- build/netlify-urls/index.html | 55 ++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 22 deletions(-) (limited to 'build/netlify-urls') diff --git a/build/netlify-urls/index.html b/build/netlify-urls/index.html index 0502441..478e083 100644 --- a/build/netlify-urls/index.html +++ b/build/netlify-urls/index.html @@ -1,49 +1,60 @@ - + Using Netlify for Dynamic URL Redirects - - + + +
-

Using Netlify for Dynamic URL Redirects

+

Using Netlify for Dynamic URL Redirects

+

2021-12-03

-

With the recent domain switch that took place on this website, I needed to have a dependable setup to forward my old domain URLs to the new one. While using something like "URL forwarding" through your domain provider could work, it doesn't natively support dynamic linking. Let me explain using a basic example:

+ +

With the recent domain switch that took place on this website, I needed to have a dependable setup to forward my old domain URLs to the new one. While using something like “URL forwarding” through your domain provider could work, it doesn’t natively support dynamic linking. Let me explain using a basic example:

+ -

Simple stuff. So, let's breakdown how to easily set this up on Netlify for free.

-

Setting Up Netlify

+ +

Simple stuff. So, let’s breakdown how to easily set this up on Netlify for free.

+ +

Setting Up Netlify

+ - -
  • Back in Netlify: under Domain Settings you need to add your custom "old" domain under the Custom domains section under Domain management
  • -
  • Lastly, add the following content inside a _redirects file (no extension) to your website content/build (changing to your own domains, of course)
  • - -
    https://olddomain.com/* https://newdomain.com/:splat 301!
    -
    -

    That's it! Now Netlify will dynamically forward all your pre-existing URLs from your old domain to the new one. No pesky .htaccess files or running your own basic web server(s)!

    + +

    That’s it! Now Netlify will dynamically forward all your pre-existing URLs from your old domain to the new one. No pesky .htaccess files or running your own basic web server(s)!

    +

    Hopefully this helps others trying to dynamically redirect their domains without the headache.

    -

    Refs

    + +

    Refs

    +
      -
    1. I normally set this up through Github / git hosting
    2. +
    3. I normally set this up through Github / git hosting