Redirect full URLS with Blogger and GoDaddy

I wanted to point sugaraunts.com to theottoolbox.com and I wanted the full path to resolve and point to the specific pages. For example, I wanted all of the following links on the left to take the user to the links on the right:

sugaraunts.com => https://theottoolbox.com
http://www.sugaraunts.com => https://theottoolbox.com
http://sugaraunts.com => https://theottoolbox.com
http://www.sugaraunts.com => https://theottoolbox.com
http://www.sugaraunts.com/2016/03/intrinsic-muscle-strengthening-play.html => https://theottoolbox.com/2016/03/intrinsic-muscle-strengthening-play.html
I tried to use just GoDaddy's domain forwarding, but the best I could do with this is redirecting the user to the root domain. So full links such as:


would only take the user to:

https://www.theottoolbox.com

I wanted to take them to:

https://theottoolbox.com/2016/03/intrinsic-muscle-strengthening-play.html

In order to do this, I needed a more sophisticated forwarding mechanism, which is available if I used a hosting account. In my case, I already owned an existing hosting account on GoDaddy, so I was able to reuse that one, saving me the cost of an additional account.

So in order to do this, I did the following:

  1. Change the A record to point to the ip address of the hosted web server
  2. Setup a new folder under the existing site
  3. Add the domain to the hosted web server and pointed to the new folder
  4. Added a Web.config with a redirection rule (this was a .Net site)

1. Change the A record to point to the ip address of the hosted web server

Go to the DNS manager in GoDaddy for the sugaraunts.com domain and edit the A record to point to the ip address of the hosted webserver for propertooey (97.74.24.22). 

Note, when the sugaraunts link break, this is probably why. Godaddy will move propertooey to a different webserver and since the A record points to the old server, the links stop working. So I need to go into the sugaraunts.com domain and add a new A record or edit the existing one. The last time I changed this was on 12/1/2021 and the ip addres for propertooey's web server was 50.62.160.49

2. Go to the File Manage in GoDaddy and create a new folder at the root level called sugaraunts

3. Add the domain to the webserver and point it to the sugaraunts folder

4. Add the web.config with the fowarding rules in it.


Quick draft: 

In order to do this, I changed sugaraunts.com in the godaddy DNS manager to have its A record point to the host ip address for the propertooey webserver. In this particular instance, I just reused the propertooey host so I didn't have to pay for another one. So I made the A record value 50.62.160.49.

Then I setup a new folder under the root website called sugaraunts.

Then I added a web.config with the redirect rule in it (and pretty much only that in it). So then all requests that go to sugaraunts.com go to that directory and iis sees that all requests to this directory should be routed to https://www.theotoolbox.com/...

And vwalla, all is right with the world

To confirm that everything is working, open an incognito browser window and clear the cache. Then test all of the following links. Also test them at : http://httpstatus.io/

sugaraunts.com
www.sugaraunts.com
http://sugaraunts.com
http://www.sugaraunts.com

http://www.sugaraunts.com/2016/03/intrinsic-muscle-strengthening-play.html

No comments:

Post a Comment

} else { }