I have an AngularJS 1.0.7 web application. Some months ago I sent a sitemap.xml file to Google, so the urls are indexed.
Now, I would like to upload a new sitemap file with some updates on those URLs. I mean, the pages are the same but the urls have changed a little bit.
The moment Google index my new Urls, I guess It will have many urls with same duplicated code, right? I´m a bit worried because I have read Google penalizes this scenarios.
I have read a little bit about this, but I´m quite newbie with all this SEO stuff. So, it´s not 100% clear to me what should I do. The perfect for my would be Google could "remove" or forget somehow the old urls and index the new ones.
I have read about canonical urls and Redirect 301. Are these the right approaches? Which one should I use?
The rel canonical approach looks pretty clear to me. But, in case I should do a redirect 301, how do I do it in my nginx or AngularJS application?
UPDATE: Just to provide a bit more detail: These are the old urls indexed by Google: http://domain/en/boats/rental-sailboat-bavaria-palma-majorca-1
and these are the new urls I would like to index: http://domain/en/boats/rental-sailboat-bavaria-cruiser-37-palma-majorca-1
Both of them returns the same content. Should I try to remove the old indexed url? Or both of them can be indexed?
The moment Google index my new Urls, I guess It will have many urls with same duplicated code, right? I´m a bit worried because I have read Google penalizes this scenarios.
No, Google does not penalize duplicate content. It is a hard to die myth perpetrated over and over on the Internet.
I have read about canonical urls and Redirect 301. Are these the right approaches? Which one should I use? The rel canonical approach looks pretty clear to me.
If you application returns a 404 not found
(or 410) for the old pages, then no worry, Google will remove them one by one, even if it may take a bit of time. That's probably the best solution for you.
Else, if your application still returns content for the old URLs and if you can set a canonical link on those pages to the new URLs, then you don't need to implement 301 redirects. It is also a solution, but not the best one unless you have accumulated a lot of SEO benefits on the old URLs. In that case, canonical or implementing 301 would be the better solution.