example.com is hosted on VPS Host1 and I want to redirect blog.example.com to the shared host Host2. .... What are the possible ways of doing this?
Let's assume the files that make up the site blog.example.com are stored on Host 1.
You can do any of these to make a redirect happen:
Either adjust server configuration to redirect URLs. The mod_rewrite module is handy for this if your Host1 allows you to use .htaccess files. See: http://httpd.apache.org/docs/current/mod/mod_rewrite.html
Here's more info on that: https://www.w3schools.com/jsref/met_loc_replace.asp
You can also use old-fashioned redirect by inserting the following line between "" and "" of your html:
<meta http-equiv="REFRESH" content="1;URL=http://newurl.example.com">
But the best way to do a redirect is by server-side ASP or PHP or equivalent coding such that the first two lines that must be sent to the client browser before any HTML is the following:
HTTP/1.1 301 Redirect
Only thing that may vary is the word "Redirect".
In all cases, http://newurl.example.com is the URL to your home page on the target server.
There is no need to make special DNS changes (like A records) if your browser doesn't report an error generated by the browser (for example: Unable to connect to remote server).
Do realize that multiple domains and multiple sub-domains can be assigned the same IP address, and for that reason, I wouldn't recommend referencing anything on your pages to the IP address. This means don't make links that look something like this: http://xxx.xxx.xxx.xxx/somefolder/whatever.html (where xxx.xxx.xxx.xxx is your IP address).