Şirketimin şu anda tamamen PHP ile yazılmış bir açılış sayfası var. Ve onu NextJS’ye taşıyoruz. Aynı zamanda çok dilli bir sitedir (iki dil, İngilizce ve Fransızca)
Asıl sorun Google SEO indekslemesidir.
Yani Google zaten aşağıdaki gibi URL’leri dizine ekledi: domain.com/en/about.php, domain.com/fr/about.phpvb. Ve NextJS için rotalar şöyle görünür: domain.com/en/about Ve domain.com/fr/about vesaire.
Ayrıca, web sitesinin tamamen yeniden yazılmasıdır. Kaldırılacak bazı özellikler var, dolayısıyla bazı sayfalar kaldırılacak. Ve içeriğin bir kısmı bu yeni sayfaya kopyalandı.
Bunu yapmanın en iyi stratejisi nedir?
SEO’nun nasıl çalıştığı konusunda pek bilgim yok ama şöyle yapmayı düşünüyordum:
Yönlendirme kuralları ekleyerek nextjs uygulamasına yönlendirmeler ekleyin. /[lang]/*.php rotalar. Her şeyi yönlendiren genel bir tane veya birer birer ekleme gibi.
Google’ın indekslediği tüm URL’lerin bir listesine sahibim.

Hey u/an4s_911 this is a great question!
So you are quitting existing, highly ranked URLs and publishing new ones.
Having lived through many migrations like this (this year alone) – some advice
1. I would keep the exact URL and use a URL rewrite for the top 10-20 URLs that rank
If you republish – one unknown and unintended consequence is that having Google index the pages and calculate Topical Authority is the order.
So you could have had 10 pages indexed successively that share root keyword phrases in the URL and now cannbalize each other – and it takes days to resolve and that can turn into weeks
The URL is called a canaon for a reason – it has to do with primacy. And if you keep the exact canon, you’ll mitigate against issues.
You can then normalize the URL structure later.
First off – there are a number of guides out there for how to deal with site migrations & SEO – I’d find them all and make plans. IMO the basics are the same across most guides, some of the more obscure things you might be able to skip.
You absolutely need to set up redirects, at least for the important pages as u/weblinkr mentioned. Without setting up redirects, you’ll have a mix of old & new URLs in the search results, and the old URLs will drive traffic to your 404 page. It’s normal for old URLs to remain indexed for a while, and you’ll often struggle to have all links from ourside your website updated, so you really need to make sure they redirect.
If you set up redirects for this, ideally pick permanent server-side redirects (308 or 301) – avoid using JavaScript redirects.
If you’re also moving images, and your site gets a lot of traffic from image search, make sure to set up redirects for the images too.
Since a move like this generally also means that at minimum your pages’ layouts also change (assuming you can keep the primary content the same — with updated links of course), keep in mind that page layout changes, as well as site structure changes (the way you deal with internal linking such as in header, sidebars, footer, etc) will have SEO effects. This is not necessarily bad, but all of this basically means you should expect some visible changes in how the site’s content is shown in search, definitely short-term (even if you get the URL changes perfect, you will see changes), perhaps even longer-term (and to improve for longer-term changes, let it settle down first).
Finally, having a list of old URLs is great, but especially for a non-trivially sized site (100+ pages? I’m picking a number), you’ll want to have something that helps you check & track semi-automatically. I’d use some sort of website crawler before you migrate (to get a clean state from before), and to use the clean state to test all the redirects (which you can do with many crawlers), and check the final state (again using a website crawler). Website crawlers like Screaming Frog are cheap, and well worth it for a site migration, you save so much time & get more peace of mind. Finally, depending on the site’s size, it might make sense to keep a static mirror around for debugging for a while.
And then, good luck :).
[removed]
What is the reason to move from php to nextjs
I’m not an SEO expert so take this with a grain of salt, but from what I understand you definitely want to set up 301 redirects from your old .php URLs to the new clean URLs. That tells Google “hey this page permanently moved here” and should transfer most of your ranking over.
For the pages you’re removing entirely, you probably want to think about whether there’s a relevant page to redirect them to, or if you just have to let them 404. If they were getting traffic, maybe redirect to the closest equivalent content on the new site.
The multi-language thing shouldn’t be too complicated since you’re keeping the same /en/ and /fr/ structure – just dropping the .php extension basically.
But seriously, listen to the other commenters here who actually do this professionally. Migrations can tank your traffic if done wrong and I’d hate for you to lose rankings because of advice from a random redditor who mostly comments about podcasts and reality TV lol