Check out example codes for "mysql get domain from url". It will help you in understanding the concepts better.

Code Example 1

SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(target_url, '/', 3), '://', -1), '/', 1), '?', 1) AS domain

Learn ReactJs, React Native from akashmittal.com