I own 2 domain names "domain1.com" and "domain2.com", I want to redirect subdomain.domain1.com to domain2.com/directory using DNS (preferably). Can anyone assist (I am an amateur at domain management)?
You can use a simple redirect pointing subdomain.domain1.com to domain2.com/directory.
In order to do this open your public_html folder. You will see a .htaccess file present under the public_html folder.
Add this code in the .htaccess file:
Some premium dns providers provide extra features at dns level such as Dyn do.
While the quote isn't a 100% match it should in theory and gives you an idea that 'somethings' can be done at dns level, however they do advise that this should ideally be done at hosting level, if you do consider this a viable solution ensure you question them beforehand as I do not have firsthand experience but have heard of others doing it a similar way.