How do I prevent www prefix in URLs?

I’ve recently migrated a site from my own Rails application to Jekyll. Now, https://keithpitty.com redirects to https://www.keithpitty.com. I can’t figure out how to prevent this. Any advice would be greatly appreciated!

I’ve now found that it this behaviour looks to be due to configuration on https://render.com. Now to work out how to fix it.

And now it works as expected!

Should I assume you modified the url in your _config.yml file? If so (or if not), it would be useful to share what you did for others that might be reading this post.

Actually, I didn’t need to change anything within my Jekyll configuration. Within Render, I needed to fix my custom domains definitions so that www.keithpitty.com was redirecting to keithpitty.com, rather than the reverse.

1 Like