# URL doesn't work in header

\documentclass[a4paper,11pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[MeX]{polski}

\makeatletter
\renewcommand\numberline[1]{#1.\hskip0.7em}
\makeatother

\usepackage{indentfirst}
\usepackage{url}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[C]{\thepage}
\url{www.kcp.krakow.pl}}}
\fancyhead[L]{{\small Diagnoza strukturalna cz. I\\Otto F. Kernberg}}
\fancypagestyle{plain}
{
}

%\usepackage[hyphens]{url}
\usepackage{hyperref}
\hypersetup
{
citecolor=black,
filecolor=black,
urlcolor=black,
pdftex
}

\frenchspacing

\begin{document}
Some text
\end{document}


All time I have problems whit hyperref. Doesn't matter what I do, it still doesn't work. Any suggestions why is that? What, exactly am I doing wrong?

-
The method I suggested in this answer works for me. Please precise what "doesn't work". –  egreg Jun 24 '12 at 13:24
After I genreted a pdf, a when I go to the TeXStudio View I click on a hiperlink and it does work. But when I open a normal pdf, from my hard memory - after a click on a link, nothing happen. What is most important, when I download a pdf[Latex one] from a web, and there is a hiperlink inside this document -- it does work, so my pdf viewer works fine. So I wonder, what is wrong? –  Daniel Miliński Jun 24 '12 at 13:32
Sorry, but Paulo Cereda helped testing the example with my suggested syntax and it works on a GNU/Linux box and on Windows, other than on Mac OS X (this is where I tested). –  egreg Jun 24 '12 at 13:51

I suggest you to write

\fancyhead[R]{%
\small Krakowskie Centrum Psychodynamiczne\\
}


that will print only www.kcp.krakow.pl but will refer internally to http://www.kcp.krakow.pl.

You can check that it's considered indeed a URL by changing the option

urlcolor=red


and see that www.kcp.krakow.pl appears in red.

As an aside, put also

\setlength{\headheight}{25pt}