$ cat 5-tricks-to-improve-your-portfolio-seo.md

5 Tricks to Improve Your Portfolio SEO

5 Tricks to Improve Your Portfolio SEO

You can build the slickest portfolio on the internet, but if a recruiter searches your name and it shows up on page four, none of that polish matters. A portfolio is a single page (or a handful of them) about one specific person — which is actually the easiest kind of site to do SEO for, because the target query is basically just your name.

Here are five tricks I applied to this exact site. None of them take more than a few minutes, and together they cover most of what search engines actually care about for a small personal site.

1. Tell Google who you are with JSON-LD structured data

This is the one I shipped most recently. Search engines don’t just read your text — they look for structured data that explicitly describes the entities on a page. For a portfolio, the two that matter are Person and WebSite.

Drop a JSON-LD block in your <head>:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Person",
  "name": "Mohamed Abdulghany",
  "jobTitle": "Software Engineer",
  "url": "https://mohamedabdulghany.com",
  "sameAs": [
    "https://github.com/MohamedMG7",
    "https://www.linkedin.com/in/mabdelghanyi/"
  ]
}
</script>

The sameAs array is the underrated part: it links your site to your GitHub, LinkedIn, and other profiles, which helps Google understand they’re all the same person. This is what powers the little knowledge panel some people get when you search their name.

2. Write real <title> and meta description tags per page

Every page needs a unique, descriptive <title> and <meta name="description">. The title is the single biggest on-page ranking signal, and the description is the snippet people read in search results before deciding whether to click.

Bad:

<title>Home</title>

Good:

<title>Mohamed Abdulghany | Software Engineer</title>
<meta name="description" content="Software engineer building backend systems and modern web apps. Selected projects, writing, and a running worklog." />

Keep titles under ~60 characters and descriptions under ~155 so they don’t get truncated. Make each page distinct — your blog index and your project pages should not share the same description.

3. Add Open Graph and Twitter Card tags

These don’t affect ranking directly, but they control how your link looks when someone shares it on LinkedIn, X, Slack, or Discord. A bare link gets ignored; a link with a title, description, and image gets clicks.

<meta property="og:title" content="Mohamed Abdulghany | Software Engineer" />
<meta property="og:description" content="Backend systems and modern web apps." />
<meta property="og:image" content="https://mohamedabdulghany.com/assets/ana.PNG" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />

More clicks means more engagement signals, which indirectly helps SEO over time.

4. Ship a sitemap and a robots.txt

Search engines crawl more efficiently when you hand them a map. A sitemap.xml lists every URL you want indexed; robots.txt tells crawlers what to look at and points them to the sitemap.

If you’re on Astro like this site, the sitemap is basically free:

// astro.config.mjs
import sitemap from "@astrojs/sitemap";

export default defineConfig({
  site: "https://mohamedabdulghany.com",
  integrations: [sitemap()],
});

Then a tiny public/robots.txt:

User-agent: *
Allow: /
Sitemap: https://mohamedabdulghany.com/sitemap-index.xml

Submit the sitemap once in Google Search Console and you’re done.

5. Use semantic HTML and one real <h1> per page

Search engines lean on your HTML structure to understand a page. Use exactly one <h1> that says what the page is about, then <h2>/<h3> for sections — don’t pick heading levels based on font size. Use <nav>, <main>, <article>, and <header> instead of a pile of <div>s.

Also: give every meaningful image a real alt attribute. It’s an accessibility win and it gives crawlers text they’d otherwise be blind to.

<img src="/assets/ana.PNG" alt="Mohamed Abdulghany, software engineer" />

Wrapping up

None of these are clever growth hacks — they’re just the fundamentals, done properly:

  1. JSON-LD so Google knows you’re a person and which profiles are yours.
  2. Titles & descriptions that are unique and human-readable per page.
  3. Open Graph tags so shared links don’t look broken.
  4. Sitemap + robots.txt so crawlers can find everything.
  5. Semantic HTML with one <h1> and real alt text.

Do these once when you set up the site and you’ve covered 90% of what a small portfolio needs. The other 10% is just publishing things worth finding.