Hey @adityarao310!
You can set up that 301 redirect from your Netlify subdomain to your primary custom domain in a _redirects or netlify.toml file. Here’s a post about it:
As for SEO, we recently rolled out an enhancement that should help with two sites that have the same content:
This Link header is visible in the response headers when you navigate directly to your Netlify subdomain- not when you go straight to your custom domain: