I`m developing some apps and hosting them on heroku
there is a problem which is indexing the website
if i publish it with top level domain there will be conflict between the heroku sub domain and the main one, search engines will index both
for example if my domain is
something.com
and heroku sub domain is
something.herokuapp.com
what should i do to delete heroku sub domain and make it only visible on main one?
Thank you
If you want to change your Heroku domain name, you can do so by going to your Heroku account settings and selecting the "Domains" tab. From there, you can add, remove, or edit your Heroku domain name.
Heroku does not provide a domain registration service (for registering a custom domain name) or a DNS provider service (for hosting the DNS servers that point your custom domain name to your app).
Heroku's free account is also quite capable, you are allowed to deploy up to 5 applications, hosted in their *. herokuapp.com domain. But, as soon as you'd like to move this app to a custom domain - you have to pay.
You can check the correct CNAME target for Custom Domains by running the Heroku CLI command: heroku domains -a your_app_name . Custom Domains created before herokudns.com was available will display your_app_name.herokuapp.com as the DNS CNAME target.
It is not possible right now. Heroku proposes to implement 301 redirect in such case. Because you don't have access to configuration of web server or some proxy on Heroku side, the only option is to implement it in the application code.
This information is specified here:
Your app’s Heroku Domain will always remain active, even if you’ve set up a custom domain. If you want users to use the custom domain exclusively, your app should send HTTP status 301 Moved Permanently to tell web browsers to use the custom domain. The Host HTTP request header field will show which domain the user is trying to access; send a redirect if that field is example.herokuapp.com.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With