?
Solved

Simple SEO: domain url in title/page

Posted on 2006-10-23
2
Medium Priority
?
227 Views
Last Modified: 2010-04-27
anyone know how to automatically insert the domain name into the <title></title> or the body of the index page
0
Comment
Question by:MasterMitch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 33

Expert Comment

by:humeniuk
ID: 17792426
This can probably be done with a server-side scripting language like PHP or ASP.  But since this is an SEO question, I have to ask why you would want to?  It seems like a waste of the title element, which is an important SEO factor.
0
 
LVL 33

Accepted Solution

by:
humeniuk earned 1000 total points
ID: 17792545
I double-checked the PHP syntax ...

$_SERVER['SERVER_NAME'] refers to the host that the page is running on.
$_SERVER['PHP_SELF'] represents the current page relative to the document root.

For the title, you would use ...

<title><?php echo $_SERVER['SERVER_NAME'],$_SERVER['PHP_SELF']; ?></title>

Here's a little example: www.humeniuk.com/ee/Q_22034907.php.

Can't help you with the ASP, though.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog, I will share you some basic tips for content marketing and to rank your website on Google.
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question