Google is not indexing the new URL structure

Bigblast

Senior Member
Joined
Mar 16, 2018
Messages
1,174
Reaction score
206
Hey Guys,

I am using a static site and for my old pages (old urls) I put this code in the header to redirect them to a new url:
<meta http-equiv="refresh" content="0; url=/new-url"> <link rel="canonical" href="/new-url" />

That was 2 month ago, what I realised today is, that google is still not indexing the new url structure. What I realised as well is, these two tags aren't really a 301 redirect, aren't they?
Since I am not using WordPress but a static site, does someone know how the code look like for the 301 redirect?

Do I need to write the code in the htaccess file or can I put it in the header as html?
What else could be the reason that google didn't index the new url structure?
Thanks
 
Is the new URL the same content? Can you get in the back end and do a proper 30X redirect rather than a header fix?
 
Are you using is different domain?
if yes - then you have to do the 301 redirection over DNS
 
The canonical is indeed a silent 301 that will redirect Big G to index the other article, rather than the article that you have a different canonical link inserted at the header.
Once you enter a canonical link that points to page 2, on page 1 (page that you do not want listed on G), then page 1 will not index, and page 2 will be listed for that specific search term instead.
But if you are trying to redirect olddomain1 to olddomain2, I don't think that the canonical is a good idea - use an appropriate 301 instead.
 
you need to log into the old domain and redirect 301 to the new domain only real way .

we can post ptogramming codes but might aswell do proper way
 
Is the new URL the same content? Can you get in the back end and do a proper 30X redirect rather than a header fix?
Yes same content and no problem with 310's
 
Last edited:
The canonical is indeed a silent 301 that will redirect Big G to index the other article, rather than the article that you have a different canonical link inserted at the header.
Once you enter a canonical link that points to page 2, on page 1 (page that you do not want listed on G), then page 1 will not index, and page 2 will be listed for that specific search term instead.
But if you are trying to redirect olddomain1 to olddomain2, I don't think that the canonical is a good idea - use an appropriate 301 instead.

I've changed it to a 310 since Google didn't index it with canonical. Thanks for your help
 
you need to log into the old domain and redirect 301 to the new domain only real way .

we can post ptogramming codes but might aswell do proper way

No the domain is the same just sub domain changes
 
Back
Top