开发者

PHP custom CMS and SEO

开发者 https://www.devze.com 2022-12-18 03:53 出处:网络
I have a custom CMS for the performing arts center in my town about to launch.They will have artists/events/media, etc. on the site via the interface I\'ve built for them in php/mysql.

I have a custom CMS for the performing arts center in my town about to launch. They will have artists/events/media, etc. on the site via the interface I've built for them in php/mysql.

My question has to do with google indexing and the CMS content. Odds are they won't be deleting archived shows (which will have a url like so: calendar_expanded?id=310) but if they do, the page will display a little blurb telling the person trying to access that record that it no longer exists, or never did.

What kinds of things should I worry about when it comes to SEO and the file calendar_expanded.php and how google and other search engines index it?

Thanks in advance, jay.

Edit

What I'm getting at here is that I don't want search engines getting a 404 error returned from the site. If the page is suddenly unavailable with REST-ful URLs as folks are suggesting I'd开发者_C百科 have to implement some way for a .htaccess permanent redirect, no?


On the record not found page offer links to the user that will let them try and find it themselves (Link to search, calender home, home page, contact us/help page). I would also have the site generate an XML sitemap (or use a tool such as XML Sitemap Generator to do it for you)

You might also consider having the URLs rewritten so it says

/events/title-of-the-event/310

So you can search the site and provide links to events with similar titles on the 404 page.


What I'm getting at here is that I don't want search engines getting a 404 error returned from the site. If the page is suddenly unavailable with REST-ful URLs as folks are suggesting I'd have to implement some way for a .htaccess permanent redirect, no?

No. You should show your special page with 404 error code but on that page you can tell others that information is no longer available and put there some informations where to find other useful info.

Search engines will be know to not showing this page but users will be informed where they should go.


Make sure that you send the appropriate HTTP status codes to tell the clients the status of their request. If a requested resource can not be found or does not exist, send the status code 400; and if it does not exist any more, send the status code 410 if possible.


You might want to consider URL rewriting to get more SEO-friend URLs. To everyone, search engine spiders included, "/expanded_calendar/310" looks a lot better than "/calendar_expanded?id=310".


Google and other Search sites will index your site as is. No matter wich version you use calendar_expanded?id=310 Will also be indexed as calendar_expanded?customerid=310

No matter which you choose Search engines will index it.


In addition to the other suggestions, you ought be send the appropriate HTTP status back to the browser, not just display a human-readable "oh, this page has been moved." Depending on how you want to handle the the request for missing info, you'd do something like this:

<?php
header("HTTP/1.0 301 Moved Permanently");
header ('Location: ' . $new_url);
?>

Then both the user and the search engine would be redirected to an overview of all events (or whatever).

0

精彩评论

暂无评论...
验证码 换一张
取 消