Redirect with 301 - subdomain

Hi everyone,

I have a blog on blogger with domain and

Also, I have a site on github pages for static files with domain

Now, i want to change the subdomain like this permanently:
blog (blogger):
pages (github pages):

I searched for how can I change with permanent redirect 301 but, I think, this is not possible on github pages, because we don’t have access to .htaccess. That’s right?

I don’t know how to redirect subdomain on github pages with permanent redirect: to and

So, how can I resolve this without loosing my datas on search engines and doesn’t break these links???

Is there a way to do this?

Tks a lot,
Carlos Correia

Hi @gutovysk, welcome to the GitHub Support Community!

There isn’t a way to do this directly on GitHub, no. GitHub doesn’t give you the ability to modify webserver settings using an .htaccess file.

However, you may be able to achieve this using your domain provider/DNS host. Certain domain providers, such as Google Domains, allow you to set a 301 redirect at the domain level. I’d recommend checking with your domain or DNS provider if this is possible.

1 Like

Tks Thomas!

But, do you know how to do a redirect in DNS, what instruction is? Is using a TXT, CNAME, or other instruction?

It depends based on your domain provider, but usually there’s an option in their settings panel if they’re able to support it. I’d recommend either reading your provider’s support documentation or asking their support team directly.

You can set up a CNAME record to alias your old domain to your new one, but this could result in poorer SEO, so a redirect is probably preferable if you’re able to set it up this way.

1 Like