dongshao8566 2016-06-17 17:28
浏览 61
已采纳

PHP代码及其对SEO的影响[关闭]

So in order to minimalize code and optimize speed of my website I have used much PHP code. I used it to contain the entirety of the header and footer of my website.

    <?php include('header.php') ?>
    ...Content...
    <?php include('footer.php') ?>

In doing so I had trapped the title meta-tag within a PHP file, so in order to change the Title for each unique page I used a PHP variable placed above the header to adjust it like so:

    <?php $title="Page Specific Title" ?>
    <?php include('header.php') ?>
    ...Remainder of site.

I have tested this out and it clearly works within the browser. However, now that I am looking into SEO for my website, I am curious.

Does using PHP to populate SEO related meta tags have a negative impact on the SEO of the page?

If so, my follow up question would be what way can I optimize the speed of the website without negatively impacting the SEO of the individual pages? Would JavaScript work or am I confined to HTML?

Thank you in advance for any that can help.

  • 写回答

1条回答 默认 最新

  • duanjiao4763 2016-06-17 17:35
    关注

    Search engines visit sites almost like a user, by which I mean a page is prepared by the server and sent to them. PHP is whats running on your server to create that page, including setting the title to the value of the variable. So what the search engine get is the output of your PHP with the variable replaced with the value.

    So no, using PHP will not effect your SEO.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 基于单片机的靶位控制系统
  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错